You are here

function _nodehierarchy_views_view_options in Node Hierarchy 7.2

Same name and namespace in other branches
  1. 5 nodehierarchy_views/nodehierarchy_views.module \_nodehierarchy_views_view_options()
  2. 6.3 nodehierarchy_views/nodehierarchy_views.module \_nodehierarchy_views_view_options()
  3. 6 nodehierarchy_views/nodehierarchy_views.module \_nodehierarchy_views_view_options()
  4. 6.2 nodehierarchy_views/nodehierarchy_views.module \_nodehierarchy_views_view_options()
  5. 7.4 nodehierarchy_views/nodehierarchy_views.module \_nodehierarchy_views_view_options()

Prepare a list of views for selection.

2 calls to _nodehierarchy_views_view_options()
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().

File

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

Code

function _nodehierarchy_views_view_options() {
  $options = array();
  $options[0] = '-- ' . t('NONE') . ' --';
  $views = views_get_all_views();
  foreach ($views as $view_name => $view) {
    foreach ($view->display as $display_id => $display) {
      if (_nodehierarchy_views_is_nh_view($view, $display_id)) {
        $options["{$view_name}:{$display_id}"] = $view->name . ': ' . $display->display_title;
      }
    }
  }
  return $options;
}