You are here

function nat_get_children in Node Auto Term [NAT] 6.2

Same name and namespace in other branches
  1. 5 nat.module \nat_get_children()
  2. 6 nat.module \nat_get_children()
  3. 7.2 nat.module \nat_get_children()
  4. 7 nat.module \nat_get_children()

Retrieve all all the children of a node via its NAT association. Note: taxonomy_select_nodes is a rather resource hungry function.

Parameters

$nid: The node ID of the node whose child nodes are to be retrieved.

$types: Unknown.

$vocabularies: Retrict children to nodes categorised using provided vocabularies.

Return value

The resource identifier returned by taxonomy_select_nodes.

File

./nat.module, line 325
NAT - node auto term - is a helper module that automatically creates a term using the same title as a node.

Code

function nat_get_children($nid, $types = array(), $vocabularies = array()) {
  $terms = nat_get_terms_by_vocabulary($nid, $vocabularies);
  $tids = array_keys($terms);
  return taxonomy_select_nodes($tids);
}