Documentation

Structure_Controller_Show extends Core_Controller
in package

Показ структуры сайта.

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

  • menu($menuId) вывод узлов структуры меню $menu, по умолчанию NULL (вывод из всех меню)
  • parentId($parentId) идентификатор родительского узла, по умолчанию 0
  • level($level) выводить узлы структуры только до уровня вложенности $level, по умолчанию NULL - не ограничено
  • showProperties(TRUE|FALSE|array()) выводить значения дополнительных свойств узлов структуры, по умолчанию FALSE. Может принимать массив с идентификаторами дополнительных свойств, значения которых необходимо вывести.
  • structurePropertiesList(TRUE|FALSE|array()) выводить список дополнительных свойств узлов структуры, по умолчанию FALSE.
  • sortPropertiesValues(TRUE|FALSE) сортировать значения дополнительных свойств, по умолчанию TRUE.
  • showInformationsystemGroups(TRUE|FALSE) выводить связанные с узлом структуры группы информационной системы, по умолчанию FALSE
  • showInformationsystemItems(TRUE|FALSE) выводить связанные с узлом структуры информационные элементы, по умолчанию FALSE
  • showShopGroups(TRUE|FALSE) выводить связанные с узлом структуры группы магазина, по умолчанию FALSE
  • showShopItems(TRUE|FALSE) выводить связанные с узлом структуры товары, по умолчанию FALSE
  • showInformationsystemGroupProperties(TRUE|FALSE|array()) выводить значения дополнительных свойств групп информационной системы, по умолчанию FALSE
  • showInformationsystemItemProperties(TRUE|FALSE|array()) выводить значения дополнительных свойств информационных элементов, по умолчанию FALSE
  • showShopGroupProperties(TRUE|FALSE|array()) выводить значения дополнительных свойств групп магазина, по умолчанию FALSE
  • showShopItemProperties(TRUE|FALSE|array()) выводить значения дополнительных свойств товаров, по умолчанию FALSE
  • showShopItemAssociated(TRUE|FALSE) выводить сопутствующие товары, по умолчанию FALSE
  • showMedia(TRUE|FALSE) выводить значения библиотеки файлов для узлов структры, по умолчанию FALSE
  • showInformationsystemGroupMedia(TRUE|FALSE) выводить значения библиотеки файлов для групп информационной системы, по умолчанию FALSE
  • showInformationsystemItemMedia(TRUE|FALSE) выводить значения библиотеки файлов для информационных элементов, по умолчанию FALSE
  • showShopGroupMedia(TRUE|FALSE) выводить значения библиотеки файлов для групп магазина, по умолчанию FALSE
  • showShopItemMedia(TRUE|FALSE) выводить значения библиотеки файлов для товаров, по умолчанию FALSE
  • cache(TRUE|FALSE) использовать кэширование, по умолчанию TRUE
  • showPanel(TRUE|FALSE) показывать панель быстрого редактирования, по умолчанию TRUE
  • onStep(3000) количество элементов, выбираемых запросом за 1 шаг, по умолчанию 500
  • addAllowedTags('/node/path', array('description')) массив тегов для элементов, указанных в первом аргументе, разрешенных к передаче в генерируемый XML
  • addForbiddenTags('/node/path', array('description')) массив тегов для элементов, указанных в первом аргументе, запрещенных к передаче в генерируемый XML

Устаревшие методы:

  • forbiddenTags(array('name')) массив тегов узла структуры, запрещенных к передаче в генерируемый XML

Доступные свойства:

  • currentStructureId идентификатор узла структуры

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

  • '/' или '/site' Сайт
  • '/site/structure' Раздел структуры
  • '/site/structure/informationsystem_group' Информационная группа, если не указано, то будет применяться '/site/structure'
  • '/site/structure/informationsystem_item' Информационный элемент, если не указано, то будет применяться '/site/structure'
  • '/site/structure/shop_group' Группа магазина, если не указано, то будет применяться '/site/structure'
  • '/site/structure/shop_item' Товар, если не указано, то будет применяться '/site/structure'
$Structure_Controller_Show = new Structure_Controller_Show( Core_Entity::factory('Site', 1) );
$Structure_Controller_Show
	->xsl(
		Core_Entity::factory('Xsl')->getByName('Меню')
	)
	->show();
Tags
subpackage

Structure

version
7.x
author

Hostmake LLC

copyright

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

Table of Contents

Properties

$_aInformationsystem_Groups  : array<string|int, mixed>
List of groups
$_aInformationsystem_Items  : array<string|int, mixed>
List of items
$_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>
List of property directories
$_aShop_Groups  : array<string|int, mixed>
List of shop groups
$_aShop_Items  : array<string|int, mixed>
List of shop items
$_aSiteuserGroups  : array<string|int, mixed>
Array of siteuser's groups allowed for current siteuser
$_aStructures  : array<string|int, mixed>
List of structuries
$_aTags  : mixed
Tags for cache
$_attributePrefix  : string
Attribute's prefix
$_cacheApplyForbiddenAllowedTags  : array<string|int, mixed>
Cache for applyForbiddenAllowedTags
$_cacheName  : string
Cache name
$_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
$_Informationsystems  : array<string|int, mixed>
List of information systems
$_mode  : string
Controller's mode
$_propertiesValues  : array<string|int, mixed>
Properties values
$_Shops  : array<string|int, mixed>
List of shops
$_shownIDs  : array<string|int, mixed>
Shown IDs
$_Structure  : object
Structure object
$_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
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
applyForbiddenAllowedTags()  : self
Apply Forbidden-Allowed Tags for Entity
applyForbiddenTags()  : self
Apply forbidden tags
assign()  : self
Assign variables/objects to the TPL-template
clearCacheTag()  : self
Clear Cache Tag
clearEntities()  : self
Clear enities
clearVars()  : self
Clear vars
fillInformationsystem()  : self
Fill _aInformationsystem_Groups and _aInformationsystem_Items
fillShop()  : self
Fill Shop
get()  : string
Get HTML based by entities tree, use XSL $this->_xsl
getAllowedTags()  : array<string|int, mixed>
Get allowed tags list
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
getInformationsystemGroups()  : array<string|int, mixed>
Get _aInformationsystem_Groups set
getInformationsystemItems()  : array<string|int, mixed>
Get _aInformationsystem_Items set
getInformationsystems()  : array<string|int, mixed>
Get _Informationsystems set
getShopGroups()  : array<string|int, mixed>
Get _aShop_Groups set
getShopItems()  : array<string|int, mixed>
Get _aShop_Items set
getShops()  : array<string|int, mixed>
Get _Shops set
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
inCache()  : null|true|false
Check if data is cached
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
set()  : self
Run when writing data to inaccessible properties
setAttributePrefix()  : self
Change attributePrefix
setEntity()  : self
Set entity
setInformationsystems()  : self
Set _Informationsystems set
setShops()  : self
Set _Shops set
setUnlimitedProperties()  : self
Set unlimitedProperties
show()  : self
Show built data
structure()  : Structure_Model
Set Structure
tpl()  : self
Set TPL
xsl()  : self
Set XSL
_addInformationsystemGroups()  : self
Add all groups of information system to XML
_addInformationsystemGroupsByParentId()  : self
Add groups of information system to XML
_addPropertyList()  : self
Create the tree of property dirs and properties
_addShopGroups()  : self
Add all groups of shop to XML
_addShopGroupsByParentId()  : self
Add shop groups to the object by parent group ID
_addStructuresByParentId()  : self
Create the tree of structures
_getSiteuserGroups()  : array<string|int, mixed>
Get array of siteuser groups for current siteuser. Exists group 0 (all) and -1 (parent)
_selectInformationsystems()  : self
Select informationsystems
_selectShops()  : self
Select shops
_showPanel()  : $this
Show frontend panel

Properties

$_aInformationsystem_Groups

List of groups

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

$_aInformationsystem_Items

List of items

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

$_allowedProperties

Allowed object properties

protected array<string|int, mixed> $_allowedProperties = array('menu', 'parentId', 'level', 'showProperties', 'structurePropertiesList', 'sortPropertiesValues', 'showInformationsystemGroups', 'showInformationsystemItems', 'showShopGroups', 'showShopItems', 'showInformationsystemGroupProperties', 'showInformationsystemItemProperties', 'showShopGroupProperties', 'showShopItemProperties', 'showShopItemAssociated', 'showMedia', 'showInformationsystemGroupMedia', 'showInformationsystemItemMedia', 'showShopGroupMedia', 'showShopItemMedia', 'forbiddenTags', 'cache', 'currentStructureId', 'showPanel', 'onStep')

$_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

List of property directories

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

$_aShop_Groups

List of shop groups

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

$_aShop_Items

List of shop items

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

$_aSiteuserGroups

Array of siteuser's groups allowed for current siteuser

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

$_aStructures

List of structuries

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

$_aTags

Tags for cache

protected mixed $_aTags = array()

$_attributePrefix

Attribute's prefix

protected string $_attributePrefix = '_'

$_cacheApplyForbiddenAllowedTags

Cache for applyForbiddenAllowedTags

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

$_cacheName

Cache name

protected string $_cacheName = 'structure_show'

$_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()

$_Informationsystems

List of information systems

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

$_mode

Controller's mode

protected string $_mode = 'json'

$_propertiesValues

Properties values

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

$_Shops

List of shops

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

$_shownIDs

Shown IDs

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

$_Structure

Structure object

protected object $_Structure = \NULL

$_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

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

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

applyForbiddenTags()

Apply forbidden tags

public applyForbiddenTags(Core_Entity $object) : self
Parameters
$object : Core_Entity
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

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

fillInformationsystem()

Fill _aInformationsystem_Groups and _aInformationsystem_Items

public fillInformationsystem(Informationsystem_Model $oInformationsystem[, object $parentObject = NULL ]) : self
Parameters
$oInformationsystem : Informationsystem_Model
$parentObject : object = NULL
Tags
hostcms-event

Structure_Controller_Show.onBeforeFindInformationsystemGroups

hostcms-event

Structure_Controller_Show.onBeforeFindInformationsystemItems

Return values
self

fillShop()

Fill Shop

public fillShop(Shop_Model $oShop[, object $parentObject = NULL ]) : self
Parameters
$oShop : Shop_Model

shop

$parentObject : object = NULL
Tags
hostcms-event

Structure_Controller_Show.onBeforeFindShopGroups

hostcms-event

Structure_Controller_Show.onBeforeFindShopItems

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>

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>

getInformationsystemGroups()

Get _aInformationsystem_Groups set

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

getInformationsystemItems()

Get _aInformationsystem_Items set

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

getInformationsystems()

Get _Informationsystems set

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

getShopGroups()

Get _aShop_Groups set

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

getShopItems()

Get _aShop_Items set

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

getShops()

Get _Shops set

public getShops() : 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

inCache()

Check if data is cached

public inCache() : null|true|false
Return values
null|true|false

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

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

setInformationsystems()

Set _Informationsystems set

public setInformationsystems(array<string|int, mixed> $array) : self
Parameters
$array : array<string|int, mixed>
Return values
self

setShops()

Set _Shops set

public setShops(array<string|int, mixed> $array) : self
Parameters
$array : array<string|int, mixed>
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

Structure_Controller_Show.onBeforeRedeclaredShow

hostcms-event

Structure_Controller_Show.onBeforeAddStructurePropertiesList

Return values
self

_addInformationsystemGroups()

Add all groups of information system to XML

protected _addInformationsystemGroups(object $parentObject, Informationsystem_Model $oInformationsystem[, mixed $level = 0 ]) : self
Parameters
$parentObject : object
$oInformationsystem : Informationsystem_Model
$level : mixed = 0
Return values
self

_addInformationsystemGroupsByParentId()

Add groups of information system to XML

protected _addInformationsystemGroupsByParentId(int $parent_id, object $parentObject[, mixed $level = 0 ]) : self
Parameters
$parent_id : int

ID of parent group

$parentObject : object
$level : mixed = 0
Tags
hostcms-event

Structure_Controller_Show.onBeforeAddInformationsystemGroups

hostcms-event

Structure_Controller_Show.onAfterAddInformationsystemGroups

hostcms-event

Structure_Controller_Show.onAfterAddInformationsystemGroup

hostcms-event

Structure_Controller_Show.onBeforeAddInformationsystemItems

hostcms-event

Structure_Controller_Show.onAfterAddInformationsystemItems

hostcms-event

Structure_Controller_Show.onAfterAddInformationsystemItem

Return values
self

_addPropertyList()

Create the tree of property dirs and properties

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

property group ID

$parentObject : object
Return values
self

_addShopGroups()

Add all groups of shop to XML

protected _addShopGroups(object $parentObject, Shop_Model $oShop[, mixed $level = 0 ]) : self
Parameters
$parentObject : object
$oShop : Shop_Model

shop

$level : mixed = 0
Return values
self

_addShopGroupsByParentId()

Add shop groups to the object by parent group ID

protected _addShopGroupsByParentId(int $parent_id, object $parentObject[, mixed $level = 0 ]) : self
Parameters
$parent_id : int

parent group ID

$parentObject : object
$level : mixed = 0
Tags
hostcms-event

Structure_Controller_Show.onBeforeAddShopGroups

hostcms-event

Structure_Controller_Show.onAfterAddShopGroups

hostcms-event

Structure_Controller_Show.onAfterAddShopGroup

hostcms-event

Structure_Controller_Show.onBeforeAddShopItems

hostcms-event

Structure_Controller_Show.onAfterAddShopItems

hostcms-event

Structure_Controller_Show.onAfterAddShopItem

Return values
self

_addStructuresByParentId()

Create the tree of structures

protected _addStructuresByParentId(int $parent_id, object $parentObject[, int $level = 0 ]) : self
Parameters
$parent_id : int
$parentObject : object
$level : int = 0
Return values
self

_getSiteuserGroups()

Get array of siteuser groups for current siteuser. Exists group 0 (all) and -1 (parent)

protected _getSiteuserGroups() : array<string|int, mixed>
Return values
array<string|int, mixed>

_selectInformationsystems()

Select informationsystems

protected _selectInformationsystems() : self
Tags
hostcms-event

Structure_Controller_Show.onAfterSelectInformationsystems

Return values
self

_selectShops()

Select shops

protected _selectShops() : self
Tags
hostcms-event

Structure_Controller_Show.onAfterSelectShops

Return values
self

_showPanel()

Show frontend panel

protected _showPanel() : $this
Tags
hostcms-event

Structure_Controller_Show.onBeforeShowPanel

Return values
$this

        
On this page

Search results