function nodehierarchy_get_node_parent_nids in Node Hierarchy 7.4
Same name and namespace in other branches
- 6.3 nodehierarchy.module \nodehierarchy_get_node_parent_nids()
- 6.2 nodehierarchy.module \nodehierarchy_get_node_parent_nids()
- 7.2 nodehierarchy.module \nodehierarchy_get_node_parent_nids()
Get the parent nodes for the given node.
3 calls to nodehierarchy_get_node_parent_nids()
- nodehierarchy_get_node_ancestor_nids in ./
nodehierarchy.api.inc - Get the ALL ancestor nodes for the given node.
- nodehierarchy_get_node_parent_nodes in ./
nodehierarchy.api.inc - Get the parent nodes for the given node.
- nodehierarchy_get_node_parent_primary_nid in ./
nodehierarchy.api.inc - Get the primary parent nid for the given node.
File
- ./
nodehierarchy.api.inc, line 11 - API functions for Node Hierarchy
Code
function nodehierarchy_get_node_parent_nids($node, $limit = NULL) {
$out = array();
foreach (nodehierarchy_get_node_parents($node, $limit) as $parent) {
// This may be an array after a node has been submitted.
$parent = (object) $parent;
$out[] = $parent->pnid;
}
return $out;
}