You are here

function _nodehierarchy_views_view_options in Node Hierarchy 5

Same name and namespace in other branches
  1. 6.3 nodehierarchy_views/nodehierarchy_views.module \_nodehierarchy_views_view_options()
  2. 6 nodehierarchy_views/nodehierarchy_views.module \_nodehierarchy_views_view_options()
  3. 6.2 nodehierarchy_views/nodehierarchy_views.module \_nodehierarchy_views_view_options()
  4. 7.4 nodehierarchy_views/nodehierarchy_views.module \_nodehierarchy_views_view_options()
  5. 7.2 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_nodehierarchyapi in nodehierarchy_views/nodehierarchy_views.module
Implementation of hook_nodehierarchyapi().
nodehierarchy_views_update in nodehierarchy_views/nodehierarchy_views.module
Update the given embedded view.

File

nodehierarchy_views/nodehierarchy_views.module, line 178
Views.module integration for nodehierarchy.module.

Code

function _nodehierarchy_views_view_options() {
  $options = array();
  $options[0] = '-- ' . t('NONE') . ' --';
  include_once drupal_get_path('module', 'views') . '/views_cache.inc';
  $default_views = _views_get_default_views();
  $res = db_query("SELECT name FROM {view_view} ORDER BY name");
  while ($view = db_fetch_object($res)) {
    $options[$view->name] = $view->name;
  }
  if (is_array($default_views)) {
    foreach ($default_views as $key => $view) {
      $options[$key] = $view->name;
    }
  }
  return $options;
}