You are here

function _views_menu_item in Views (for Drupal 7) 5

Helper function to create a menu item for a view.

1 call to _views_menu_item()
_views_create_menu_item in ./views.module
Helper function to add a menu item for a view.

File

./views.module, line 246

Code

function _views_menu_item($path, $title, $view, $args, $access, $type, $weight = NULL) {
  array_unshift($args, $view->name);
  $retval = array(
    'path' => $path,
    'title' => $title,
    'callback' => 'views_view_page',
    'callback arguments' => $args,
    'access' => user_access('access content') && $access,
    'type' => $type,
  );
  if ($weight !== NULL) {
    $retval['weight'] = $weight;
  }
  return $retval;
}