function nodehierarchy_node_can_be_child_of in Node Hierarchy 6.3
Same name and namespace in other branches
- 5 nodehierarchy.module \nodehierarchy_node_can_be_child_of()
- 6 nodehierarchy.module \nodehierarchy_node_can_be_child_of()
- 6.2 nodehierarchy.module \nodehierarchy_node_can_be_child_of()
- 7.4 nodehierarchy.admin.inc \nodehierarchy_node_can_be_child_of()
- 7.2 nodehierarchy.module \nodehierarchy_node_can_be_child_of()
Determine if a given node can be a child of another given node.
Parameters
$parent: The potentential parent node (can be null for any node).
$child: The potential child node (can be null for any node).
Return value
Boolean. Whether second node can be a child of the first.
File
- ./
nodehierarchy.module, line 1049 - A module to make nodes hierarchical.
Code
function nodehierarchy_node_can_be_child_of($parent = NULL, $child = NULL) {
return in_array($child->type, nodehierarchy_get_allowed_child_types($parent->type));
}