You are here

function _nodehierarchy_get_parent_types in Node Hierarchy 5

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

Get a list of types which can be parents.

1 call to _nodehierarchy_get_parent_types()
_nodehierarchy_views_get_descendant_parents in nodehierarchy_views/nodehierarchy_views.module
Returnt the list of descendants of the given node which can also themselves be parents.

File

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

Code

function _nodehierarchy_get_parent_types($child_type = "", $quoted = FALSE) {

  // $child_type is currently unused
  $types = array();
  foreach (node_get_types() as $key => $type) {
    if (variable_get('nh_parent_' . $key, FALSE)) {
      $types[] = $quoted ? "'{$key}'" : $key;
    }
  }
  return $types;
}