_flattenArray()
addItem()
addItemToID()
cTreeItem()
collapseBelowID()
collapseBelowLevel()
deleteAttribute()
deleteItem()
expandBelowID()
expandBelowLevel()
exportTree()
flatTraverse()
getAttribute()
getCollapsedList()
getExpandedList()
getItemByID()
hasAttribute()
importStructuredArray()
importTable()
moveItem()
setAttribute()
setAttributes()
setCollapsed()
setExpanded()
setName()
setPayloadObject()
traverse()
unsetPayloadObject()
$_attributes
$_collapsed
$_id
$_level
$_name
$_next
$_parent
$_previous
$_subitems
class cTreeItem
_flattenArray($sourcearray, $destarray, $lastid, $level)
cTreeItem($id, $name, $collapsed)
collapseBelowID(int $id, $found) : void
access | public |
---|
int
leveloffset Level offset. Ignores all expand operations below the offset.
collapseBelowLevel(int $leveloffset) : void
access | public |
---|
int
leveloffset Level offset. Ignores all expand operations below the offset.
deleteAttribute(string $attributeName) : void
access | public |
---|
string
attributeName
deleteItem(mixed $id) : \deleted
access | public |
---|
mixed
item object or ID to delete
\deleted
objectexportTree() : array
access | public |
---|
array
flatTraverse(integer $level)
integer
Level to start on
getAttribute(string $attributeName) : mixed
access | public |
---|
string
attributeName
mixed
getCollapsedList(array $list)
array
Contains the list with all collapsed items
getExpandedList(array $list)
array
Contains the list with all expanded items
getItemByID(string $id) : \cTreeItem
hasAttribute($attributeName, $bRecursive)
importStructuredArray($array)
importTable(array $flat_array) : void
The entries "collapsed" and "attributes" are optional!
access | public |
---|
array
flat_array See above
moveItem(\cTreeItem $targetItem, mixed $itemToMove) : void
access | public |
---|
mixed
itemToMove cTreeItem-Object or id of object to move
setAttribute(string $attributeName, array $attributeValue) : void
access | public |
---|
string
attributeName
array
attributeValue The value(s) of the attribute
setAttributes(string $aAttributeArray) : void
access | public |
---|
string
attributeName
setCollapsed(mixed $id) : void
access | public |
---|
mixed
collapse ID to collapse or an array with items to collapse
setExpanded(mixed $id) : void
access | public |
---|
mixed
expand ID of item to expand or array of item ID's to expand
setName(string $name) : \none
string
New name for this item
\none
setPayloadObject(object $payload) : void
access | public |
---|
object
payload The object to payload
traverse(object $objects, integer $level)
object
all found objects
integer
Level to start on
unsetPayloadObject() : object
access | public |
---|
object
$_attributes : array
$_collapsed : boolean
$_id : string
$_level : integer
$_name : string
$_next : array
$_parent : array
$_previous : array
$_subitems : array