1 admin_bar.map.inc views_ui_admin_bar_map()

Implements hook_admin_bar_map() on behalf of Views UI module.

File

core/modules/admin_bar/admin_bar.map.inc, line 157
Implements hook_admin_bar_map() on behalf of core modules.

Code

function views_ui_admin_bar_map() {
  if (!user_access('administer views')) {
    return;
  }
  $views = array();
  foreach (views_get_enabled_views() as $name => $view) {
    $views[$name] = $view->human_name;
  }
  if (empty($views)) {
    return;
  }
  natcasesort($views);
  $views = array_keys($views);
  $map['admin/structure/views/view/%views_ui_cache'] = array(
    'parent' => 'admin/structure/views',
    'arguments' => array(
      array('%views_ui_cache' => $views),
    ),
  );
  return $map;
}