contenido\classes\widgets\class.widgets.treeview.php

Show: PublicProtectedPrivateinherited
Table of Contents

Constants

>VConstant  TREEVIEW_GRIDLINE_SOLID = "solid"
>VConstant  TREEVIEW_GRIDLINE_DASHED = "dashed"
>VConstant  TREEVIEW_GRIDLINE_DOTTED = "dotted"
>VConstant  TREEVIEW_GRIDLINE_NONE = "none"
>VConstant  TREEVIEW_BACKGROUND_NONE = "none"
>VConstant  TREEVIEW_BACKGROUND_SHADED = "shaded"
>VConstant  TREEVIEW_MOUSEOVER_NONE = "none"
>VConstant  TREEVIEW_MOUSEOVER_MARK = "mark"

\cWidgetTreeView

Package: Default
class cWidgetTreeView cWidgetTreeView is a visual representation of a cTree.

It supports folding, optional gridline marks and item icons.

Parent(s)
\cTree < \cTreeItem

Properties

>VPropertypublicarray $_attributes
inherited
Contains custom entries
Inherited from: \cTreeItem::$$_attributes\cTree::$$_attributes
Details
Type
array
Inherited_from
\cTreeItem::$$_attributes  
Inherited_from
\cTree::$$_attributes  
>VPropertypublic$_baseLink
Details
Type
n/a
>VPropertypublicboolean $_collapsed
inherited
Determinates if this tree item is collapsed
Inherited from: \cTreeItem::$$_collapsed\cTree::$$_collapsed
Details
Type
boolean
Inherited_from
\cTreeItem::$$_collapsed  
Inherited_from
\cTree::$$_collapsed  
>VPropertypublic$_globalActions
Details
Type
n/a
Access
private  
>VPropertypublicstring $_id
inherited
ID for this item
Inherited from: \cTreeItem::$$_id\cTree::$$_id
Details
Type
string
Inherited_from
\cTreeItem::$$_id  
Inherited_from
\cTree::$$_id  
>VPropertypublicinteger $_level
inherited
Contains the level of this item
Inherited from: \cTreeItem::$$_level\cTree::$$_level
Details
Type
integer
Inherited_from
\cTreeItem::$$_level  
Inherited_from
\cTree::$$_level  
>VPropertypublicstring $_name
inherited
Name for this item
Inherited from: \cTreeItem::$$_name\cTree::$$_name
Details
Type
string
Inherited_from
\cTreeItem::$$_name  
Inherited_from
\cTree::$$_name  
>VPropertypublicarray $_next
inherited
Contains the next item
Inherited from: \cTreeItem::$$_next\cTree::$$_next
Details
Type
array
Inherited_from
\cTreeItem::$$_next  
Inherited_from
\cTree::$$_next  
>VPropertypublicarray $_parent
inherited
Contains the parent of this item
Inherited from: \cTreeItem::$$_parent\cTree::$$_parent
Details
Type
array
Inherited_from
\cTreeItem::$$_parent  
Inherited_from
\cTree::$$_parent  
>VPropertypublicarray $_previous
inherited
Contains the previous item
Inherited from: \cTreeItem::$$_previous\cTree::$$_previous
Details
Type
array
Inherited_from
\cTreeItem::$$_previous  
Inherited_from
\cTree::$$_previous  
>VPropertypublic$_setAttributeActions
Details
Type
n/a
Access
private  
>VPropertypublic$_setItemActions
Details
Type
n/a
Access
private  
>VPropertypublicarray $_subitems
inherited
Sub Items for this tree item
Inherited from: \cTreeItem::$$_subitems\cTree::$$_subitems
Details
Type
array
Inherited_from
\cTreeItem::$$_subitems  
Inherited_from
\cTree::$$_subitems  
>VPropertypublic$_treeIcon
inheritedInherited from: \cTree::$$_treeIcon
Details
Type
n/a
Inherited_from
\cTree::$$_treeIcon  
>VPropertypublic$_unsetAttributeActions
Details
Type
n/a
Access
private  
>VPropertypublic$_unsetItemActions
Details
Type
n/a
Access
private  

Methods

methodpublic_buildImagePath( $image) : void

Parameters
NameTypeDescription
$image
methodpublic_flattenArray( $sourcearray,  $destarray,  $lastid,  $level) : void
Parameters
NameTypeDescription
$sourcearray
$destarray
$lastid
$level
methodpublic_getExpandCollapseIcon( $object) : void

Parameters
NameTypeDescription
$object
methodpublic_setExpandCollapseLink( $link,  $object) : void

Parameters
NameTypeDescription
$link
$object
methodpublicaddItem(\cTreeItem $item) : void
inherited

adds an item as a subitem to the current item

Inherited from: \cTreeItem::addItem()\cTree::addItem()
Parameters
NameTypeDescription
$item\cTreeItem

item item object to add

Details
Access
public  
methodpublicaddItemToID(string $id, \cTreeItem $item) : void
inherited

adds an item to a specific ID

Inherited from: \cTreeItem::addItemToID()\cTree::addItemToID()
Parameters
NameTypeDescription
$idstring

id ID to add the item to

$item\cTreeItem

item Item to add

Details
Access
public  
methodpublicapplyActionByItemAttribute(array $attributes, \cApiClickableAction $action) : void

Applies an action to all items with a certain attribute set.

Parameters
NameTypeDescription
$attributesarray

attributes Values which need to match. The array key is the attribute name. Multiple array entries are connected with "AND".

$action\cApiClickableAction

action Action to apply

Details
Access
public  
methodpublicapplyGlobalAction(\cApiClickableAction $action) : void

applies an action to all items in the tree.

Parameters
NameTypeDescription
$action\cApiClickableAction

action action object

Details
Access
public  
methodpublicapplyItemAction(mixed $item, \cApiClickableAction $action) : void

sets an action to a specific item.

Parameters
NameTypeDescription
$itemmixed

item cTreeItem-Object or an id of a TreeItem-Object

$action\cApiClickableAction

action

Details
Access
public  
methodpubliccTree( $name = "") : void
inherited

Inherited from: \cTree::cTree()
Parameters
NameTypeDescription
$name
methodpubliccTreeItem( $id = "",  $name = "",  $collapsed = false) : void
Parameters
NameTypeDescription
$id
$name
$collapsed
methodpubliccWidgetTreeView( $uuid,  $treename = false) : void

Parameters
NameTypeDescription
$uuid
$treename
methodpubliccollapseBelowID(int $id,  $found = false) : void
Parameters
NameTypeDescription
$idint

leveloffset Level offset. Ignores all expand operations below the offset.

$found
Details
Access
public  
methodpubliccollapseBelowLevel(int $leveloffset) : void
Parameters
NameTypeDescription
$leveloffsetint

leveloffset Level offset. Ignores all expand operations below the offset.

Details
Access
public  
methodpublicdeleteAttribute(string $attributeName) : void
inherited

deletes an attribute

Inherited from: \cTreeItem::deleteAttribute()\cTree::deleteAttribute()
Parameters
NameTypeDescription
$attributeNamestring

attributeName

Details
Access
public  
methodpublicdeleteItem(mixed $id) : \deleted
inherited

deletes a subitem

Inherited from: \cTreeItem::deleteItem()\cTree::deleteItem()
Parameters
NameTypeDescription
$idmixed

item object or ID to delete

Returns
TypeDescription
\deletedobject
Details
Access
public  
methodpublicexpandBelowID(int $id,  $found = false) : void
Parameters
NameTypeDescription
$idint

leveloffset Level offset. Ignores all expand operations below the offset.

$found
Details
Access
public  
methodpublicexpandBelowLevel(int $leveloffset) : void
Parameters
NameTypeDescription
$leveloffsetint

leveloffset Level offset. Ignores all expand operations below the offset.

Details
Access
public  
methodpublicexportTree() : array
inherited

Exports a tree as an array of arrays.

Inherited from: \cTreeItem::exportTree()\cTree::exportTree()

Array format: array( array("id" => "Item ID", "name" => "Item name", "level" => 1, "attributes" => array("attr_name" => "attr_value")) );

Returns
TypeDescription
array
Details
Access
public  
methodpublicflatTraverse(integer $level = 0) : void
inherited

flatTraverse traverses the tree starting from this item, and returning all objects as $objects in a flat array.

Inherited from: \cTreeItem::flatTraverse()\cTree::flatTraverse()
Parameters
NameTypeDescription
$levelinteger

Level to start on

methodpublicflushActionByItemAttribute(array $attributes) : void

Removes all actions for items with specific attributes

Parameters
NameTypeDescription
$attributesarray

attributes Values which need to match. The array key is the attribute name. Multiple array entries are connected with "AND".

Details
Access
public  
methodpublicflushGlobalActions() : void

flushes all actions

Details
Access
public  
methodpublicflushItemActions(mixed $item) : void

flushes all actions for a specific item

Parameters
NameTypeDescription
$itemmixed

item cTreeItem-Object or an id of a TreeItem-Object

Details
Access
public  
methodpublicgetAttribute(string $attributeName) : mixed
inherited

returns an attribute

Inherited from: \cTreeItem::getAttribute()\cTree::getAttribute()
Parameters
NameTypeDescription
$attributeNamestring

attributeName

Returns
TypeDescription
mixed
Details
Access
public  
methodpublicgetCollapsedList(array $list) : void
inherited

getCollapsedList Returns all items (as ID array) which are collapsed.

Inherited from: \cTreeItem::getCollapsedList()\cTree::getCollapsedList()
Parameters
NameTypeDescription
$listarray

Contains the list with all collapsed items

methodpublicgetExpandedList(array $list) : void
inherited

getExpandedList Returns all items (as ID array) which are expanded.

Inherited from: \cTreeItem::getExpandedList()\cTree::getExpandedList()
Parameters
NameTypeDescription
$listarray

Contains the list with all expanded items

methodpublicgetItemByID(string $id) : \cTreeItem
inherited

Retrieves a specific item by its ID.

Inherited from: \cTreeItem::getItemByID()\cTree::getItemByID()

Note that this function traverses all subitems to find the correct item.

Parameters
NameTypeDescription
$idstring

id ID to retrieve

Returns
TypeDescription
\cTreeItem
Details
Access
public  
methodpublichasAttribute( $attributeName,  $bRecursive = false) : void
Parameters
NameTypeDescription
$attributeName
$bRecursive
methodpublicimportStructuredArray( $array) : void
Parameters
NameTypeDescription
$array
methodpublicimportTable(array $flat_array) : void
inherited

Imports a table from an array of arrays.

Inherited from: \cTreeItem::importTable()\cTree::importTable()

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!

Parameters
NameTypeDescription
$flat_arrayarray

flat_array See above

Details
Access
public  
methodpublicmoveItem(\cTreeItem $targetItem, mixed $itemToMove) : void
inherited

moves an item to another object

Inherited from: \cTreeItem::moveItem()\cTree::moveItem()
Parameters
NameTypeDescription
$targetItem\cTreeItem

targetItem Item to move the subitem to

$itemToMovemixed

itemToMove cTreeItem-Object or id of object to move

Details
Access
public  
methodpublicprocessParameters() : void

methodpublicremoveActionByItemAttribute(array $attributes, \cApiClickableAction $action) : void

Removes an action from all items with a certain attribute set.

Parameters
NameTypeDescription
$attributesarray

attributes Values which need to match. The array key is the attribute name. Multiple array entries are connected with "AND".

$action\cApiClickableAction

action Action to remove

Details
Access
public  
methodpublicremoveGlobalAction(\cApiClickableAction $action) : void

removes the action from all treeitems.

Parameters
NameTypeDescription
$action\cApiClickableAction

action Removes the action from the global context.

Details
Access
public  
methodpublicremoveItemAction(mixed $item, \cApiClickableAction $action) : void

unsets an action from a specific item.

Note that you can unset global actions using this method!

Parameters
NameTypeDescription
$itemmixed

item cTreeItem-Object or an id of a TreeItem-Object

$action\cApiClickableAction

action Action to unset

Details
Access
public  
methodpublicrender( $with_root = true) : void

Parameters
NameTypeDescription
$with_root
Details
Access
public  
methodpublicsetAttribute(string $attributeName, array $attributeValue) : void
inherited

sets a custom attribute for this TreeItem

Inherited from: \cTreeItem::setAttribute()\cTree::setAttribute()
Parameters
NameTypeDescription
$attributeNamestring

attributeName

$attributeValuearray

attributeValue The value(s) of the attribute

Details
Access
public  
methodpublicsetAttributes(string $aAttributeArray) : void
inherited

sets a bunch of attributes

Inherited from: \cTreeItem::setAttributes()\cTree::setAttributes()
Parameters
NameTypeDescription
$aAttributeArraystring

attributeName

Details
Access
public  
methodpublicsetBackgroundColors( $colors) : void

Parameters
NameTypeDescription
$colors
methodpublicsetBackgroundMode( $mode) : void

Parameters
NameTypeDescription
$mode
methodpublicsetBaseLink( $link) : void

Parameters
NameTypeDescription
$link
methodpublicsetCollapsed(mixed $id) : void
Parameters
NameTypeDescription
$idmixed

collapse ID to collapse or an array with items to collapse

Details
Access
public  
methodpublicsetExpanded(mixed $id) : void
Parameters
NameTypeDescription
$idmixed

expand ID of item to expand or array of item ID's to expand

Details
Access
public  
methodpublicsetGridlineMode(int $mode) : void

Parameters
NameTypeDescription
$modeint

mode Sets the gridline mode to one of the following values: TREEVIEW_GRIDLINE_SOLID TREEVIEW_GRIDLINE_DASHED TREEVIEW_GRIDLINE_DOTTED TREEVIEW_GRIDLINE_NONE

Details
Access
public  
methodpublicsetIcon( $path) : void
inherited

Inherited from: \cTree::setIcon()
Parameters
NameTypeDescription
$path
methodpublicsetMouseoverMode( $mode) : void

Parameters
NameTypeDescription
$mode
methodpublicsetName(string $name) : \none
inherited

setName sets the Name for this item.

Inherited from: \cTreeItem::setName()\cTree::setName()
Parameters
NameTypeDescription
$namestring

New name for this item

Returns
TypeDescription
\none
methodpublicsetPayloadObject(object $payload) : void
inherited

sets a payload object for later reference

Inherited from: \cTreeItem::setPayloadObject()\cTree::setPayloadObject()
Parameters
NameTypeDescription
$payloadobject

payload The object to payload

Details
Access
public  
methodpublicsetTreeName(string $name) : void
inherited

sets a new name for the tree.

Inherited from: \cTree::setTreeName()
Parameters
NameTypeDescription
$namestring

name Name of the tree

Details
Access
public  
methodpublictraverse(object $objects, integer $level = 0) : void
inherited

traverse traverses the tree starting from this item, and returning all objects as $objects in a nested array.

Inherited from: \cTreeItem::traverse()\cTree::traverse()
Parameters
NameTypeDescription
$objectsobject

all found objects

$levelinteger

Level to start on

methodpublicunsetPayloadObject() : object
inherited

unsets a payload object

Inherited from: \cTreeItem::unsetPayloadObject()\cTree::unsetPayloadObject()
Returns
TypeDescription
object
Details
Access
public  
Documentation was generated by phpDocumentor 2.0.0a12.