function _nodehierarchy_views_is_nh_view in Node Hierarchy 6.3
Same name and namespace in other branches
- 6.2 nodehierarchy_views/nodehierarchy_views.module \_nodehierarchy_views_is_nh_view()
- 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 223 - Embed a view of children onto a node.
Code
function _nodehierarchy_views_is_nh_view($view, $display = 'default') {
$view
->set_display($display);
$view
->build($display);
$arg = reset($args = (array) $view->argument);
if (!empty($arg->table) && ($arg->table == "nh_parent" || $arg->table == "nh_ancestor")) {
return TRUE;
}
return FALSE;
}