|
| _initialize () |
|
| _makeSelBoxOptions ($fieldName, $selected, $key, &$ret, $prefix_orig, $prefix_curr= '') |
|
| getAllChild ($key, $ret=array()) |
|
| getAllParent ($key, $ret=array(), $uplevel=1) |
|
& | getByKey ($key) |
|
| getFirstChild ($key) |
|
& | getTree () |
|
| makeSelBox ($name, $fieldName, $prefix= '-', $selected= '', $addEmptyOption=false, $key=0, $extra= '') |
|
| XoopsObjectTree (&$objectArr, $myId, $parentId, $rootId=null) |
|
Definition at line 29 of file tree.php.
XoopsObjectTree::_initialize |
( |
| ) |
|
Initialize the object
private
Definition at line 64 of file tree.php.
References $i.
XoopsObjectTree::_makeSelBoxOptions |
( |
|
$fieldName, |
|
|
|
$selected, |
|
|
|
$key, |
|
|
& |
$ret, |
|
|
|
$prefix_orig, |
|
|
|
$prefix_curr = '' |
|
) |
| |
Make options for a select box from
- Parameters
-
string | $fieldName | Name of the member variable from the node objects that should be used as the title for the options. |
string | $selected | Value to display as selected |
int | $key | ID of the object to display as the root of select options |
string | $ret | (reference to a string when called from outside) Result from previous recursions |
string | $prefix_orig | String to indent items at deeper levels |
string | $prefix_curr | String to indent the current item |
- Returns
- private
Definition at line 165 of file tree.php.
References $ret.
XoopsObjectTree::getAllChild |
( |
|
$key, |
|
|
|
$ret = array() |
|
) |
| |
returns an array of all child objects of an object specified by its id
- Parameters
-
string | $key | ID of the parent |
array | $ret | (Empty when called from client) Array of children from previous recursions. |
- Returns
- array Array of child nodes.
Definition at line 119 of file tree.php.
References $ret.
XoopsObjectTree::getAllParent |
( |
|
$key, |
|
|
|
$ret = array() , |
|
|
|
$uplevel = 1 |
|
) |
| |
returns an array of all parent objects. the key of returned array represents how many levels up from the specified object
- Parameters
-
string | $key | ID of the child object |
array | $ret | (empty when called from outside) Result from previous recursions |
int | $uplevel | (empty when called from outside) level of recursion |
- Returns
- array Array of parent nodes.
Definition at line 141 of file tree.php.
References $ret.
& XoopsObjectTree::getByKey |
( |
|
$key | ) |
|
returns an object from the tree specified by its id
- Parameters
-
string | $key | ID of the object to retrieve |
- Returns
- object Object within the tree
Definition at line 92 of file tree.php.
XoopsObjectTree::getFirstChild |
( |
|
$key | ) |
|
returns an array of all the first child object of an object specified by its id
- Parameters
-
string | $key | ID of the parent object |
- Returns
- array Array of children of the parent
Definition at line 102 of file tree.php.
References $ret.
& XoopsObjectTree::getTree |
( |
| ) |
|
Get the tree
- Returns
- array Associative array comprising the tree
Definition at line 82 of file tree.php.
XoopsObjectTree::makeSelBox |
( |
|
$name, |
|
|
|
$fieldName, |
|
|
|
$prefix = '-' , |
|
|
|
$selected = '' , |
|
|
|
$addEmptyOption = false , |
|
|
|
$key = 0 , |
|
|
|
$extra = '' |
|
) |
| |
Make a select box with options from the tree
- Parameters
-
string | $name | Name of the select box |
string | $fieldName | Name of the member variable from the node objects that should be used as the title for the options. |
string | $prefix | String to indent deeper levels |
string | $selected | Value to display as selected |
bool | $addEmptyOption | Set TRUE to add an empty option with value "0" at the top of the hierarchy |
integer | $key | ID of the object to display as the root of select options |
- Returns
- string HTML select box
Definition at line 194 of file tree.php.
References $ret.
XoopsObjectTree::XoopsObjectTree |
( |
& |
$objectArr, |
|
|
|
$myId, |
|
|
|
$parentId, |
|
|
|
$rootId = null |
|
) |
| |
Constructor
- Parameters
-
array | $objectArr | Array of XoopsObjects |
string | $myId | field name of object ID |
string | $parentId | field name of parent object ID |
string | $rootId | field name of root object ID |
Definition at line 49 of file tree.php.
XoopsObjectTree::$_objects |
XoopsObjectTree::$_parentId |
*#@+
private
Definition at line 35 of file tree.php.
XoopsObjectTree::$_rootId = null |
XoopsObjectTree::$_tree = array() |
The documentation for this class was generated from the following file:
- L:/0xoops/xoops-2.5.6/htdocs/class/tree.php