You are here

function nodehierarchy_node_can_be_parent in Node Hierarchy 7.4

Same name and namespace in other branches
  1. 5 nodehierarchy.module \nodehierarchy_node_can_be_parent()
  2. 6.3 nodehierarchy.module \nodehierarchy_node_can_be_parent()
  3. 6 nodehierarchy.module \nodehierarchy_node_can_be_parent()
  4. 6.2 nodehierarchy.module \nodehierarchy_node_can_be_parent()
  5. 7.2 nodehierarchy.module \nodehierarchy_node_can_be_parent()

Can a node be a parent.

7 calls to nodehierarchy_node_can_be_parent()
nodehierarchy_children_tab_access in ./nodehierarchy.module
Children tab access callback.
nodehierarchy_views_field_extra_fields in nodehierarchy_views/nodehierarchy_views.module
Implements hook_content_extra_fields().
nodehierarchy_views_nodehierarchy_node_form in nodehierarchy_views/nodehierarchy_views.module
@todo Please document this function.
nodehierarchy_views_nodehierarchy_node_type_settings_form in nodehierarchy_views/nodehierarchy_views.module
Implements hook_nodehierarchy_node_type_settings_form().
_nodehierarchy_content_extra_fields in ./nodehierarchy.admin.inc
Implements hook_content_extra_fields().

... See full list

File

./nodehierarchy.admin.inc, line 711
Admin functions for Node Hierarchy

Code

function nodehierarchy_node_can_be_parent($node) {
  $type = is_object($node) ? $node->type : $node;
  return count(nodehierarchy_get_allowed_child_types($type));
}