[ Index ] |
|
Code source de Horde 3.1.3 |
[Code source] [Imprimer] [Statistiques]
Display extra columns to the left of the main tree.
Poids: | 513 lignes (16 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
Horde_Tree:: (15 méthodes):
singleton()
factory()
fallback()
Horde_Tree()
renderTree()
setOption()
getOption()
addNode()
addNodeParams()
addNodeExtra()
sort()
_sort()
isExpanded()
setHeader()
_buildIndents()
Classe: Horde_Tree - X-Ref
The Horde_Tree:: class provides a tree view of hierarchical information. Itsingleton($name, $renderer, $params = array() X-Ref |
Attempts to return a reference to a concrete Horde_Tree instance based on $name and $renderer. It will only create a new instance if no Horde_Tree instance with the same parameters currently exists. This method must be invoked as: $var = &Horde_Tree::singleton($name[, $renderer]); param: mixed $name @see Horde_Tree::factory. param: string $renderer @see Horde_Tree::factory. param: array $params @see Horde_Tree::factory. return: Horde_Tree The concrete Horde_Tree reference, or PEAR_Error on |
factory($name, $renderer, $params = array() X-Ref |
Attempts to return a concrete Horde_Tree instance. param: string $name The name of this tree instance. param: mixed $renderer The type of concrete Horde_Tree subclass to param: array $params Any additional parameters the constructor return: Horde_Tree The newly created concrete Horde_Tree instance, or |
fallback($renderer) X-Ref |
Try to fall back to a simpler renderer. return: string | PEAR_Error The next best renderer, or an error |
Horde_Tree($name, $params = array() X-Ref |
Constructor. param: string $name The name of this tree instance. param: array $params Additional parameters. |
renderTree($static = false) X-Ref |
Renders the tree. param: boolean $static If true the tree nodes can't be expanded and |
setOption($options, $value = null) X-Ref |
Sets an option. Available options: <pre> alternate -- Alternate shading in the table? (boolean) hideHeaders -- Don't render any HTML for the header row, just use the widths. class -- The class to use for the table. (string) lines -- Show tree lines? (boolean) multiline -- Do the node labels contain linebreaks? (boolean) </pre> param: mixed $option The option name -or- an array of option name/value param: mixed $val The option's value. |
getOption($option, $html = false, $default = null) X-Ref |
Gets an option's value. param: string $option The name of the option to fetch. param: boolean $html True or false whether to format the return value param: string $default A default value to use in case none is set for return: mixed The option's value. |
addNode($id, $parent, $label, $indent, $expanded = true,$params = array() X-Ref |
Adds a node to the node tree array. param: string $id The unique node id. param: string $parent The parent's unique node id. param: string $label The text label for the node. param: string $indent Deprecated, this is calculated automatically param: boolean $expanded Is this level expanded or not. param: array $params Any other parameters to set (@see param: array $extra_right Any other columns to display to the right of param: array $extra_left Any other columns to display to the left of |
addNodeParams($id, $params = array() X-Ref |
Adds additional parameters to a node. param: string $id The unique node id. param: array $params Any other parameters to set. |
addNodeExtra($id, $side, $extra) X-Ref |
Adds extra columns to be displayed to the side of the node. param: mixed $id The unique node id. param: integer $side Which side to place the extra columns on. param: array $extra Extra columns to display. |
sort($criteria, $id = -1) X-Ref |
Sorts the tree by the specified node property. param: string $criteria The node property to sort by. param: integer $id Used internally for recursion. |
_sort($a, $b) X-Ref |
Helper method for sort() to compare two tree elements. |
isExpanded($id) X-Ref |
Returns whether the specified node is currently expanded. param: mixed $id The unique node id. return: boolean True if the specified node is expanded. |
setHeader($header) X-Ref |
Adds column headers to the tree table. param: array $header An array containing hashes with header |
_buildIndents($nodes, $indent = 0) X-Ref |
Set the indent level for each node in the tree. |
Généré le : Sun Feb 25 18:01:28 2007 | par Balluche grâce à PHPXref 0.7 |