Documentation

Siteuser_Controller_Show extends Core_Controller
in package

Показ личного кабинета пользователя.

Доступные методы:

  • properties(TRUE|FALSE) показывать дополнительные свойства, по умолчанию FALSE
  • sortPropertiesValues(TRUE|FALSE) сортировать значения дополнительных свойств, по умолчанию TRUE.
  • showDiscountcards(TRUE|FALSE) показывать дисконтные карты, по умолчанию FALSE
  • showTransactionsAmount(TRUE|FALSE) показывать сумму по лицевым счетам, по умолчанию FALSE
  • showFriends(TRUE|FALSE) показывать друзей, по умолчанию FALSE
  • showGroups(TRUE|FALSE) показывать группы, по умолчанию FALSE
  • showResponsible(TRUE|FALSE) показывать ответственных сотрудников, по умолчанию FALSE
  • showMaillists(TRUE|FALSE) показывать почтовые рассылки, по умолчанию FALSE
  • showAffiliats(TRUE|FALSE) показывать аффилиатов, по умолчанию FALSE
  • showAffiliatsTree(TRUE|FALSE) показывать дерево аффилиатов, по умолчанию FALSE
  • showForumCounts(TRUE|FALSE) показывать количество сообщений на форуме, по умолчанию FALSE
  • showConnectedProviders(TRUE|FALSE) показывать связанные социальные сети, по умолчанию TRUE
  • addAllowedTags('/node/path', array('description')) массив тегов для элементов, указанных в первом аргументе, разрешенных к передаче в генерируемый XML
  • addForbiddenTags('/node/path', array('description')) массив тегов для элементов, указанных в первом аргументе, запрещенных к передаче в генерируемый XML

Доступные пути для методов addAllowedTags/addForbiddenTags:

  • '/' или '/siteuser' Клиент
  • '/siteuser/properties/property' Свойство в списке свойст клиентов
  • '/siteuser/properties/property_dir' Раздел свойств в списке свойств клиента
  • '/siteuser/shop' Магазин
  • '/siteuser/shop/shop_discountcard' Дисконтные карты в магазине
$oSiteuser = Core_Entity::factory('Siteuser')->getCurrent(); is_null($oSiteuser) && $oSiteuser = Core_Entity::factory('Siteuser'); $Siteuser_Controller_Show = new Siteuser_Controller_Show( $oSiteuser );

$Siteuser_Controller_Show ->xsl( Core_Entity::factory('Xsl')->getByName('ЛичныйКабинетПользователя') ) ->show();

Tags
subpackage

Siteuser

version
7.x
author

Hostmake LLC

copyright

© 2005-2024 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

Properties

$_allowedProperties  : array<string|int, mixed>
Allowed object properties
$_allowedTags  : array<string|int, mixed>
Allowed tags for specified elements
$_aProperties  : array<string|int, mixed>
List of properties
$_aProperty_Dirs  : array<string|int, mixed>
Property directories
$_attributePrefix  : string
Attribute's prefix
$_cacheApplyForbiddenAllowedTags  : array<string|int, mixed>
Cache for applyForbiddenAllowedTags
$_cacheTags  : array<string|int, mixed>
Cache tags
$_entities  : array<string|int, mixed>
List of children entities
$_entity  : Core_Entity
Entity
$_forbiddenTags  : array<string|int, mixed>
Forbidden tags for specified elements
$_mode  : string
Controller's mode
$_propertiesValues  : array<string|int, mixed>
Properties values
$_shownIDs  : array<string|int, mixed>
Shown IDs
$_tpl  : Tpl_Model
TPL
$_unlimitedProperties  : bool
Object has unlimited number of properties
$_vars  : array<string|int, mixed>
Variables/objects to the TPL-template
$_xsl  : Xsl_Model
XSL

Methods

__construct()  : mixed
Constructor.
addAllowedProperties()  : self
Add additional allowed properties
addAllowedProperty()  : self
Add additional allowed property
addAllowedTag()  : self
Add tag to allowed tags list
addAllowedTags()  : self
Add tags to allowed tags list
addCacheSignature()  : self
Add additional signature for cache name
addCacheTag()  : self
Add Cache Tag
addEntities()  : self
Add enities
addEntity()  : self
Add a children entity
addFailedLoginAttempt()  : mixed
Check the possibility of authorization based on Siteuser_Accessdenied
addForbiddenTag()  : self
Add tag to forbidden tags list
addForbiddenTags()  : self
Add tags to forbidden tags list
append()  : self
Append an element to an assigned array
applyAffiliate()  : self
Apply Affiliate to the Siteuser
applyForbiddenAllowedTags()  : self
Apply Forbidden-Allowed Tags for Entity
assign()  : self
Assign variables/objects to the TPL-template
checkAuthorizationPossibility()  : bool
Check the possibility of authorization based on Siteuser_Accessdenied
checkCsrf()  : bool
Check valid CSRF-token
checkLocation()  : mixed
Check location
clearCacheTag()  : self
Clear Cache Tag
clearEntities()  : self
Clear enities
clearVars()  : self
Clear vars
error404()  : self
Define handler for 404 error
get()  : string
Get HTML based by entities tree, use XSL $this->_xsl
getAllowedTags()  : array<string|int, mixed>
Get allowed tags list
getByLoginAndPassword()  : Siteuser_Model|null|false
Get user by login and password
getCacheTags()  : array<string|int, mixed>
Get Cache Tags
getEntities()  : array<string|int, mixed>
Get enities
getEntity()  : object
Get entity
getForbiddenTags()  : array<string|int, mixed>
Get forbidden tags list
getShownIDs()  : array<string|int, mixed>
Get shown IDs
getStdObject()  : array<string|int, mixed>
Get ARRAY for entity and children entities
getTpl()  : Tpl_Model
Get TPL
getXml()  : string
Get XML for entity and children entities
getXsl()  : Xsl_Model
Get XSL
go()  : mixed
Перейти на страницу $location
isAllowedTag()  : bool
Check if a tag is allowed
isForbiddenTag()  : bool
Check if a tag is forbidden
mode()  : self
Set mode
removeAllowedTag()  : self
Remove tag from allowed tags list
removeForbiddenTag()  : self
Remove tag from forbidden tags list
sendConfirmationMail()  : self
Send confirmation e-mail
set()  : self
Run when writing data to inaccessible properties
setAttributePrefix()  : self
Change attributePrefix
setEntity()  : self
Set entity
setUnlimitedProperties()  : self
Set unlimitedProperties
show()  : self
Show built data
tpl()  : self
Set TPL
xsl()  : self
Set XSL
_addAffiliatsTree()  : self
Add tree of affiliats to XML
_addPropertiesList()  : self
Add list of user's properties to XML
_getSiteuserRelationships()  : array<string|int, mixed>
Get siteuser relationships

Properties

$_allowedProperties

Allowed object properties

protected array<string|int, mixed> $_allowedProperties = array('subject', 'contentType', 'properties', 'sortPropertiesValues', 'showGroups', 'showResponsible', 'showDiscountcards', 'showTransactionsAmount', 'showFriends', 'friendsPerGroup', 'showConnectedProviders', 'showMaillists', 'showAffiliats', 'showAffiliatsTree', 'showForumCounts', 'fastRegistration', 'location', 'dateFrom', 'dateTo')

$_allowedTags

Allowed tags for specified elements

protected array<string|int, mixed> $_allowedTags = array()

$_aProperties

List of properties

protected array<string|int, mixed> $_aProperties = array()

$_aProperty_Dirs

Property directories

protected array<string|int, mixed> $_aProperty_Dirs = array()

$_attributePrefix

Attribute's prefix

protected string $_attributePrefix = '_'

$_cacheApplyForbiddenAllowedTags

Cache for applyForbiddenAllowedTags

protected array<string|int, mixed> $_cacheApplyForbiddenAllowedTags = array()

$_cacheTags

Cache tags

protected array<string|int, mixed> $_cacheTags = array()

$_entities

List of children entities

protected array<string|int, mixed> $_entities = array()

$_forbiddenTags

Forbidden tags for specified elements

protected array<string|int, mixed> $_forbiddenTags = array()

$_mode

Controller's mode

protected string $_mode = 'json'

$_propertiesValues

Properties values

protected array<string|int, mixed> $_propertiesValues = array()

$_shownIDs

Shown IDs

protected array<string|int, mixed> $_shownIDs = array()

$_unlimitedProperties

Object has unlimited number of properties

protected bool $_unlimitedProperties = \FALSE

$_vars

Variables/objects to the TPL-template

protected array<string|int, mixed> $_vars = array()

Methods

addAllowedProperties()

Add additional allowed properties

public addAllowedProperties(array<string|int, mixed> $array) : self
Parameters
$array : array<string|int, mixed>

array of properties' names

Return values
self

addAllowedProperty()

Add additional allowed property

public addAllowedProperty(string $property) : self
Parameters
$property : string

property name

Return values
self

addAllowedTag()

Add tag to allowed tags list

public addAllowedTag(string $path, string $tag) : self
Parameters
$path : string

Path to item, e.g. /shop/shop_item

$tag : string

tag

Return values
self

addAllowedTags()

Add tags to allowed tags list

public addAllowedTags(string $path[, array<string|int, mixed> $aTags = array() ]) : self
Parameters
$path : string

Path to item, e.g. /shop/shop_item

$aTags : array<string|int, mixed> = array()

array of tags

Return values
self

addCacheSignature()

Add additional signature for cache name

public addCacheSignature(string $name) : self
Parameters
$name : string

name

Return values
self

addCacheTag()

Add Cache Tag

public addCacheTag(string $tagName) : self
Parameters
$tagName : string
Return values
self

addEntities()

Add enities

public addEntities(array<string|int, mixed> $aChildrenEntities) : self
Parameters
$aChildrenEntities : array<string|int, mixed>

entities

Return values
self

addFailedLoginAttempt()

Check the possibility of authorization based on Siteuser_Accessdenied

public static addFailedLoginAttempt() : mixed

addForbiddenTag()

Add tag to forbidden tags list

public addForbiddenTag(string $path, string $tag) : self
Parameters
$path : string

Path to item, e.g. /shop/shop_item

$tag : string

tag

Return values
self

addForbiddenTags()

Add tags to forbidden tags list

public addForbiddenTags(string $path[, array<string|int, mixed> $aTags = array() ]) : self
Parameters
$path : string

Path to item, e.g. /shop/shop_item

$aTags : array<string|int, mixed> = array()

array of tags

Return values
self

append()

Append an element to an assigned array

public append(mixed $varname, mixed $var) : self
Parameters
$varname : mixed
$var : mixed
Return values
self

applyAffiliate()

Apply Affiliate to the Siteuser

public applyAffiliate(string $affiliateName) : self
Parameters
$affiliateName : string

Affiliate Name

Return values
self

applyForbiddenAllowedTags()

Apply Forbidden-Allowed Tags for Entity

public applyForbiddenAllowedTags(string $path, Core_Entity|array<string|int, mixed> $mEntity) : self
Parameters
$path : string

Path to item, e.g. /shop/shop_item

$mEntity : Core_Entity|array<string|int, mixed>
Return values
self

assign()

Assign variables/objects to the TPL-template

public assign(mixed $varname, mixed $var) : self
Parameters
$varname : mixed
$var : mixed
Return values
self

checkAuthorizationPossibility()

Check the possibility of authorization based on Siteuser_Accessdenied

public static checkAuthorizationPossibility() : bool
Return values
bool

checkCsrf()

Check valid CSRF-token

public checkCsrf(string $secret_csrf) : bool
Parameters
$secret_csrf : string

Token to check

Return values
bool

checkLocation()

Check location

public checkLocation(string $location) : mixed
Parameters
$location : string

URL

clearCacheTag()

Clear Cache Tag

public clearCacheTag() : self
Return values
self

clearEntities()

Clear enities

public clearEntities() : self
Return values
self

clearVars()

Clear vars

public clearVars() : self
Return values
self

error404()

Define handler for 404 error

public error404() : self
Return values
self

get()

Get HTML based by entities tree, use XSL $this->_xsl

public get() : string
Tags
see
getXml()
hostcms-event

Core_Controller.onBeforeShow

hostcms-event

Core_Controller.onAfterShow

Return values
string

getAllowedTags()

Get allowed tags list

public getAllowedTags() : array<string|int, mixed>
Return values
array<string|int, mixed>

getByLoginAndPassword()

Get user by login and password

public getByLoginAndPassword(string $login, string $password) : Siteuser_Model|null|false
Parameters
$login : string

login

$password : string

password

Return values
Siteuser_Model|null|false

FALSE if access is temporarily denied, NULL if the siteuser is not found

getCacheTags()

Get Cache Tags

public getCacheTags() : array<string|int, mixed>
Return values
array<string|int, mixed>

getEntities()

Get enities

public getEntities() : array<string|int, mixed>
Return values
array<string|int, mixed>

getEntity()

Get entity

public getEntity() : object
Return values
object

getForbiddenTags()

Get forbidden tags list

public getForbiddenTags() : array<string|int, mixed>
Return values
array<string|int, mixed>

getShownIDs()

Get shown IDs

public getShownIDs() : array<string|int, mixed>
Return values
array<string|int, mixed>

getStdObject()

Get ARRAY for entity and children entities

public getStdObject() : array<string|int, mixed>
Return values
array<string|int, mixed>

getXml()

Get XML for entity and children entities

public getXml() : string
Return values
string

go()

Перейти на страницу $location

public go(string $location) : mixed
Parameters
$location : string

URL

isAllowedTag()

Check if a tag is allowed

public isAllowedTag(string $path, string $tag) : bool
Parameters
$path : string

Path to item, e.g. /shop/shop_item

$tag : string

tag

Return values
bool

isForbiddenTag()

Check if a tag is forbidden

public isForbiddenTag(string $path, string $tag) : bool
Parameters
$path : string

Path to item, e.g. /shop/shop_item

$tag : string

tag

Return values
bool

mode()

Set mode

public mode(string $mode) : self
Parameters
$mode : string
Return values
self

removeAllowedTag()

Remove tag from allowed tags list

public removeAllowedTag(string $path, string $tag) : self
Parameters
$path : string

Path to item, e.g. /shop/shop_item

$tag : string

tag

Return values
self

removeForbiddenTag()

Remove tag from forbidden tags list

public removeForbiddenTag(string $path, string $tag) : self
Parameters
$path : string

Path to item, e.g. /shop/shop_item

$tag : string

tag

Return values
self

sendConfirmationMail()

Send confirmation e-mail

public sendConfirmationMail(Xsl_Model $oXsl) : self
Parameters
$oXsl : Xsl_Model
Return values
self

set()

Run when writing data to inaccessible properties

public set(string $property, string $value) : self
Parameters
$property : string

property name

$value : string

property value

Return values
self

setAttributePrefix()

Change attributePrefix

public setAttributePrefix(string $attributePrefix) : self
Parameters
$attributePrefix : string
Return values
self

setUnlimitedProperties()

Set unlimitedProperties

public setUnlimitedProperties([bool $value = TRUE ]) : self
Parameters
$value : bool = TRUE

default TRUR

Return values
self

show()

Show built data

public show() : self
Tags
hostcms-event

Siteuser_Controller_Show.onBeforeRedeclaredShow

Return values
self

_addAffiliatsTree()

Add tree of affiliats to XML

protected _addAffiliatsTree(Siteuser_Model $oSiteuser, object $parentObject) : self
Parameters
$oSiteuser : Siteuser_Model
$parentObject : object
Return values
self

_addPropertiesList()

Add list of user's properties to XML

protected _addPropertiesList(int $parent_id, object $parentObject) : self
Parameters
$parent_id : int

parent directory

$parentObject : object
Return values
self

_getSiteuserRelationships()

Get siteuser relationships

protected _getSiteuserRelationships(int $siteuser_relationship_type_id) : array<string|int, mixed>
Parameters
$siteuser_relationship_type_id : int
Return values
array<string|int, mixed>

array of Siteuser_Relationship_Model


        
On this page

Search results