[ Index ] |
|
Code source de XOOPS 2.0.17.1 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 227 lignes (9 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
XoopsObjectTree:: (9 méthodes):
XoopsObjectTree()
_initialize()
getTree()
getByKey()
getFirstChild()
getAllChild()
getAllParent()
_makeSelBoxOptions()
makeSelBox()
Classe: XoopsObjectTree - X-Ref
A tree structures with {@link XoopsObject}s as nodesXoopsObjectTree(&$objectArr, $myId, $parentId, $rootId = null) X-Ref |
Constructor param: array $objectArr Array of {@link XoopsObject}s param: string $myId field name of object ID param: string $parentId field name of parent object ID param: string $rootId field name of root object ID |
_initialize() X-Ref |
Initialize the object |
getTree() X-Ref |
Get the tree return: array Associative array comprising the tree |
getByKey($key) X-Ref |
returns an object from the tree specified by its id param: string $key ID of the object to retrieve return: object Object within the tree |
getFirstChild($key) X-Ref |
returns an array of all the first child object of an object specified by its id param: string $key ID of the parent object return: array Array of children of the parent |
getAllChild($key, $ret = array() X-Ref |
returns an array of all child objects of an object specified by its id param: string $key ID of the parent param: array $ret (Empty when called from client) Array of children from previous recursions. return: array Array of child nodes. |
getAllParent($key, $ret = array() X-Ref |
returns an array of all parent objects. the key of returned array represents how many levels up from the specified object param: string $key ID of the child object param: array $ret (empty when called from outside) Result from previous recursions param: int $uplevel (empty when called from outside) level of recursion return: array Array of parent nodes. |
_makeSelBoxOptions($fieldName, $selected, $key, &$ret, $prefix_orig, $prefix_curr = '') X-Ref |
Make options for a select box from param: string $fieldName Name of the member variable from the param: string $selected Value to display as selected param: int $key ID of the object to display as the root of select options param: string $ret (reference to a string when called from outside) Result from previous recursions param: string $prefix_orig String to indent items at deeper levels param: string $prefix_curr String to indent the current item return: |
makeSelBox($name, $fieldName, $prefix='-', $selected='', $addEmptyOption = false, $key=0) X-Ref |
Make a select box with options from the tree param: string $name Name of the select box param: string $fieldName Name of the member variable from the param: string $prefix String to indent deeper levels param: string $selected Value to display as selected param: bool $addEmptyOption Set TRUE to add an empty option with value "0" at the top of the hierarchy param: integer $key ID of the object to display as the root of select options return: string HTML select box |
Généré le : Sun Nov 25 11:44:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |