Changeset 334 for trunk/lib/Hierarchy.inc.php
- Timestamp:
- May 13, 2008 4:14:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Hierarchy.inc.php
r201 r334 11 11 * data. You must provide identification of a piece of data (type and ID) to 12 12 * insert it into the hierarchy. The node hierarchy is completely 13 * separate from data storage and retr eival. You must separatly store the data13 * separate from data storage and retrieval. You must separately store the data 14 14 * using whatever logic is specific to the data then also call these functions. 15 15 * Nodes are not the data. The nodes are mere singularities in virtual space … … 123 123 124 124 /** 125 * Takes a sing lar node identifier and returns it as components of an array.125 * Takes a singular node identifier and returns it as components of an array. 126 126 * @param string $node 127 127 * @return mixed Array of node type and id on success, false on failure. … … 145 145 * @param string $parents A serialized array of serialized parent identifiers 146 146 * @param string $relationship_type 147 * @return bool true on suc ess, false on error.147 * @return bool true on success, false on error. 148 148 */ 149 149 function insertNode($parents, $child_type=null, $child_id=null, $relationship_type=null, $title='') … … 346 346 /** 347 347 * Returns an array of all the parents of the current node (just the ones 348 * immediat ly above this node). You may need to call array_unique if you348 * immediately above this node). You may need to call array_unique if you 349 349 * don't want duplicate nodes returned. 350 350 * … … 439 439 /** 440 440 * Returns an array of all the children of the current node (just the ones 441 * immediat ly below this node). You may need to call array_unique if you441 * immediately below this node). You may need to call array_unique if you 442 442 * don't want duplicate nodes returned. 443 443 * … … 598 598 * @param bool $go_linear ? 599 599 * @param int $_return_flag An internal value that counts up as 600 * recursion prog esses. When the value600 * recursion progresses. When the value 601 601 * drops back to 0, we return the output. 602 602 * @return array Array of serialized node identifiers. … … 756 756 } 757 757 if (!$is_a_leaf[$this->toStringID($my_children[$i]['child_type'], $my_children[$i]['child_id'])]) { 758 // If this node is not a leaf, we dive into it recursiv ly.758 // If this node is not a leaf, we dive into it recursively. 759 759 $this->getNodeList($preselected, $my_children[$i]['child_type'], $my_children[$i]['child_id'], $type_constraint, $include_curr, $order, $_indent+1, false); 760 760 } … … 803 803 /** 804 804 * Used internally by setSubnodeQty to add the quantity of subnodes to 805 * all parents recursiv ly.805 * all parents recursively. 806 806 */ 807 807 function setSubnodeQtyToParents($child_type, $child_id, $num_children)
Note: See TracChangeset
for help on using the changeset viewer.