You are here

function nodehierarchy_get_descendant_list in Node Hierarchy 5

Same name and namespace in other branches
  1. 6 nodehierarchy.module \nodehierarchy_get_descendant_list()

Get the descendant tree for the given node.

2 calls to nodehierarchy_get_descendant_list()
nodehierarchy_insert_node in ./nodehierarchy.module
Insert or update a node. Set it's parent
_nodehierarchyaccess_set_descendant_grants in nodehierarchyaccess/nodehierarchyaccess.module
Set the given grants for the given node and it's descentants

File

./nodehierarchy.module, line 803
A module to make nodes hierarchical.

Code

function nodehierarchy_get_descendant_list($nid) {
  $out = array();
  $children = nodehierarchy_get_children($nid);
  $out = $children;
  foreach ($children as $child) {
    $out = array_merge($out, nodehierarchy_get_descendant_list($child));
  }
  return $out;
}