You are here

function _nodehierarchy_widgets_autocomplete_parent_value in Node Hierarchy 7.2

Same name and namespace in other branches
  1. 6.3 nodehierarchy_widgets/nodehierarchy_widgets.module \_nodehierarchy_widgets_autocomplete_parent_value()
  2. 6.2 nodehierarchy_widgets/nodehierarchy_widgets.module \_nodehierarchy_widgets_autocomplete_parent_value()
  3. 7.4 nodehierarchy_widgets/nodehierarchy_widgets.module \_nodehierarchy_widgets_autocomplete_parent_value()

Get the default display value for a node hierarchy autocomplete.

1 call to _nodehierarchy_widgets_autocomplete_parent_value()
nodehierarchy_widgets_nodehierarchy_get_parent_selector in nodehierarchy_widgets/nodehierarchy_widgets.module
Implements hook_nodehierarchy_get_parent_selector().

File

nodehierarchy_widgets/nodehierarchy_widgets.module, line 151
Alternative parent selector widgets for Node Hierarchy.

Code

function _nodehierarchy_widgets_autocomplete_parent_value($pnid) {
  if ($pnid && ($item = node_load($pnid))) {
    return $item->title . ' [nid:' . $item->nid . ']';
  }
}