You are here

function _nodehierarchy_views_is_nh_view in Node Hierarchy 6.2

Same name and namespace in other branches
  1. 6.3 nodehierarchy_views/nodehierarchy_views.module \_nodehierarchy_views_is_nh_view()
  2. 7.2 nodehierarchy_views/nodehierarchy_views.module \_nodehierarchy_views_is_nh_view()

Determine if the given view/display is node hierarchy compatible.

1 call to _nodehierarchy_views_is_nh_view()
_nodehierarchy_views_view_options in nodehierarchy_views/nodehierarchy_views.module
Prepare a list of views for selection.

File

nodehierarchy_views/nodehierarchy_views.module, line 222
Embed a view of children onto a node.

Code

function _nodehierarchy_views_is_nh_view($view, $display = 'default') {
  if (!empty($view->display[$display]->display_options['arguments'])) {
    $args = (array) $view->display[$display]->display_options['arguments'];
    $first_arg = reset($args);
    if ($first_arg['table'] == "nh_parent" || $first_arg['table'] == "nh_ancestor") {
      return TRUE;
    }
  }
  return FALSE;
}