Helpdesk_Controller_Show
extends Core_Controller
in package
Показ службы прддержки.
Доступные методы:
- category($id) идентификатор категории, из которой выводить тикеты
- ticket($id) идентификатор тикета, из которой выводить сообщения
- ticketsForbiddenTags(array('source')) массив тегов тикета, запрещенных к передаче в генерируемый XML
- offset($offset) смещение, с которого выводить тикеты. По умолчанию 0
- limit($limit) количество выводимых элементов
- page(2) текущая страница, по умолчанию 0, счет ведется с 0
- criticalityLevels(TRUE|FALSE) показывать уровни критичности
- messageSortingDirection() направление сортировки сообщений, 0 - ASC, 1 - DESC
- messageSortingField() поле сортировки сообщений, 0 - sorting, 1 - datetime
- addAllowedTags('/node/path', array('description')) массив тегов для элементов, указанных в первом аргументе, разрешенных к передаче в генерируемый XML
- addForbiddenTags('/node/path', array('description')) массив тегов для элементов, указанных в первом аргументе, запрещенных к передаче в генерируемый XML
Доступные свойства:
- total общее количество доступных для отображения элементов
- patternParams массив данных, извелеченных из URI при применении pattern
Доступные пути для методов addAllowedTags/addForbiddenTags:
- '/' или '/helpdesk' Helpdesk
- '/helpdesk/helpdesk_ticket' Тикет
- '/helpdesk/helpdesk_ticket/helpdesk_message' Сообщение тикета
- '/helpdesk/helpdesk_category' Категория
Tags
Table of Contents
- $_aHelpdesk_Categories : Helpdesk_Category_Model
- List of helpdesk categories
- $_allowedProperties : array<string|int, mixed>
- Allowed object properties
- $_allowedTags : array<string|int, mixed>
- Allowed tags for specified elements
- $_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
- $_Helpdesk_Categories : Helpdesk_Categor
- Helpdesk's categories object
- $_Helpdesk_Tickets : Helpdesk_Ticket_Model
- Helpdesk's tickets object
- $_mode : string
- Controller's mode
- $_propertiesValues : array<string|int, mixed>
- Properties values
- $_shownIDs : array<string|int, mixed>
- Shown IDs
- $_Siteuser : Siteuser_Model
- Current user
- $_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
- __construct() : mixed
- Constructor.
- addAllCategories() : self
- Add all categories to controller
- 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
- applyTicketsForbiddenTags() : self
- Apply forbidden tags for ticket
- assign() : self
- Assign variables/objects to the TPL-template
- clearCacheTag() : self
- Clear Cache Tag
- clearEntities() : self
- Clear enities
- clearVars() : self
- Clear vars
- error403() : self
- Define handler for 403 error
- 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
- 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
- helpdeskCategories() : Helpdesk_Ticket_Model
- Get helpdesk categories
- helpdeskTickets() : Helpdesk_Ticket_Model
- Get helpdesk tickets
- mode() : self
- Set mode
- parseUrl() : self
- Parse URL and set controller properties
- 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
- setUnlimitedProperties() : self
- Set unlimitedProperties
- show() : self
- Show built data
- tpl() : self
- Set TPL
- xsl() : self
- Set XSL
- _addCategoriesByParentId() : self
- Add categories subtree to $parentObject
Properties
$_aHelpdesk_Categories
List of helpdesk categories
protected
Helpdesk_Category_Model
$_aHelpdesk_Categories
= array()
$_allowedProperties
Allowed object properties
protected
array<string|int, mixed>
$_allowedProperties
= array('category', 'ticket', 'ticketsForbiddenTags', 'offset', 'limit', 'page', 'total', 'worktime', 'pattern', 'patternParams', 'criticalityLevels', 'messageSortingDirection', 'messageSortingField')
$_allowedTags
Allowed tags for specified elements
protected
array<string|int, mixed>
$_allowedTags
= 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()
$_entity
Entity
protected
Core_Entity
$_entity
= \NULL
$_forbiddenTags
Forbidden tags for specified elements
protected
array<string|int, mixed>
$_forbiddenTags
= array()
$_Helpdesk_Categories
Helpdesk's categories object
protected
Helpdesk_Categor
$_Helpdesk_Categories
= \NULL
$_Helpdesk_Tickets
Helpdesk's tickets object
protected
Helpdesk_Ticket_Model
$_Helpdesk_Tickets
= \NULL
$_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()
$_Siteuser
Current user
protected
Siteuser_Model
$_Siteuser
= \NULL
$_tpl
TPL
protected
Tpl_Model
$_tpl
= \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()
$_xsl
XSL
protected
Xsl_Model
$_xsl
= \NULL
Methods
__construct()
Constructor.
public
__construct(Helpdesk_Model $oHelpdesk) : mixed
Parameters
- $oHelpdesk : Helpdesk_Model
-
helpdesk
Return values
mixed —addAllCategories()
Add all categories to controller
public
addAllCategories() : self
Return values
self —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) : self
Parameters
- $path : string
-
Path to item, e.g. /shop/shop_item
- $aTags : array<string|int, mixed>
-
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 —addEntity()
Add a children entity
public
addEntity(Core_Entity $oChildrenEntity) : self
Parameters
- $oChildrenEntity : Core_Entity
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) : self
Parameters
- $path : string
-
Path to item, e.g. /shop/shop_item
- $aTags : array<string|int, mixed>
-
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 —applyTicketsForbiddenTags()
Apply forbidden tags for ticket
public
applyTicketsForbiddenTags(Helpdesk_Ticket $oHelpdesk_Ticket) : self
Parameters
- $oHelpdesk_Ticket : Helpdesk_Ticket
-
ticket
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 —error403()
Define handler for 403 error
public
error403() : 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
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> —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> —getTpl()
Get TPL
public
getTpl() : Tpl_Model
Return values
Tpl_Model —getXml()
Get XML for entity and children entities
public
getXml() : string
Return values
string —getXsl()
Get XSL
public
getXsl() : Xsl_Model
Return values
Xsl_Model —helpdeskCategories()
Get helpdesk categories
public
helpdeskCategories() : Helpdesk_Ticket_Model
Return values
Helpdesk_Ticket_Model —helpdeskTickets()
Get helpdesk tickets
public
helpdeskTickets() : Helpdesk_Ticket_Model
Return values
Helpdesk_Ticket_Model —mode()
Set mode
public
mode(string $mode) : self
Parameters
- $mode : string
Return values
self —parseUrl()
Parse URL and set controller properties
public
parseUrl() : self
Tags
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 —setEntity()
Set entity
public
setEntity(Core_Entity $entity) : self
Parameters
- $entity : Core_Entity
-
entity
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
Return values
self —tpl()
Set TPL
public
tpl(Tpl_Model|string $tpl) : self
Parameters
- $tpl : Tpl_Model|string
Return values
self —xsl()
Set XSL
public
xsl(Xsl_Model|string $xsl) : self
Parameters
- $xsl : Xsl_Model|string
Return values
self —_addCategoriesByParentId()
Add categories subtree to $parentObject
protected
_addCategoriesByParentId(int $parent_id, object $parentObject) : self
Parameters
- $parent_id : int
-
root of subtree
- $parentObject : object
-
object