class cTreeItem
__construct($id, $name, $collapsed)
cTreeItem($id, $name, $collapsed)
deprecated | 2012-08-24 Use __construct() |
---|
deleteAttribute(string $attributeName) : void
access | public |
---|
string
attributeName
deleteItem(mixed $id) : \deleted
access | public |
---|
mixed
item object or ID to delete
\deleted
objectexportTree() : array
Array format: array( array("id" => "Item ID", "name" => "Item name", "level" => 1, "attributes" => array("attr_name" => "attr_value")) );
access | public |
---|---|
deprecated | 2011-08-22 |
array
flatTraverse(integer $level)
integer
Level to start on
getAttribute(string $attributeName) : mixed
access | public |
---|
string
attributeName
mixed
getCollapsed() : bool
bool
getCollapsedList(array $list)
array
Contains the list with all collapsed items
getExpandedList(array $list)
array
Contains the list with all expanded items
getId() : string
string
getItemByID(string $id) : \cTreeItem
Note that this function traverses all subitems to find the correct item.
access | public |
---|
string
id ID to retrieve
getName() : string
string
hasAttribute($attributeName, $bRecursive)
importStructuredArray($array)
importTable(array $flat_array) : void
Array format: array( array("id" => "Item ID", "name" => "Item name", "level" => 1, "collapsed" => true|false, "attributes" => array("attr_name" => "attr_value")) );
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
_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.
_flattenArray($sourcearray, $destarray, $lastid, $level)
$_attributes : array
$_collapsed : boolean
$_id : string
$_level : integer
$_name : string
$_next : array
$_parent : array
$_previous : array
$_subitems : array