You are here

function panels_views_menu in Panels 5.2

Same name and namespace in other branches
  1. 6.2 panels_views/panels_views.module \panels_views_menu()

Implementation of hook_menu().

File

panels_views/panels_views.module, line 15
panels_views.module

Code

function panels_views_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $access = user_access('administer panel views');
    $items[] = array(
      'path' => 'admin/panels/views',
      'title' => t('Views panes'),
      'access' => $access,
      'type' => MENU_NORMAL_ITEM,
      'callback' => 'panels_views_list_views',
      'description' => t('Configure Views to be used as panes within panel displays.'),
    );
    $items[] = array(
      'path' => 'admin/panels/views/list',
      'title' => t('List'),
      'access' => $access,
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'callback' => 'panels_views_list_views',
      'weight' => -10,
    );
    $items[] = array(
      'path' => 'admin/panels/views/add',
      'title' => t('Add'),
      'access' => $access,
      'callback' => 'panels_views_add_view',
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/panels/views/edit',
      'title' => t('Edit'),
      'access' => $access,
      'callback' => 'panels_views_edit_view',
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/panels/views/delete',
      'title' => t('Delete'),
      'access' => $access,
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'panels_views_delete_confirm',
      ),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/panels/views/import',
      'title' => t('Import'),
      'access' => $access,
      'callback' => 'panels_views_import_view',
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/panels/views/export',
      'title' => t('Export'),
      'access' => $access,
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'panels_views_export_view',
      ),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/panels/views/disable',
      'access' => $access,
      'callback' => 'panels_views_disable_page',
      'weight' => -1,
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/panels/views/enable',
      'access' => $access,
      'callback' => 'panels_views_enable_page',
      'weight' => -1,
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}