You are here

function _panels_mini_menu in Panels 6.2

Same name and namespace in other branches
  1. 6.3 panels_mini/panels_mini.admin.inc \_panels_mini_menu()

Implementation of hook_menu().

1 call to _panels_mini_menu()
panels_mini_menu in panels_mini/panels_mini.module
Implementation of hook_menu().

File

panels_mini/panels_mini.admin.inc, line 11
Administrative items for the panels mini module.

Code

function _panels_mini_menu() {

  // Provide some common options to reduce code repetition.
  // By using array addition and making sure these are the rightmost
  // value, they won't override anything already set.
  $base = array(
    'access arguments' => array(
      'create mini panels',
    ),
    'file' => 'panels_mini.admin.inc',
  );
  $items['admin/panels/panel-mini'] = array(
    'title' => 'Mini panels',
    'page callback' => 'panels_mini_list_page',
    'description' => 'Create and administer mini panels (panels exposed as blocks).',
  ) + $base;
  $items['admin/panels/panel-mini/list'] = array(
    'title' => 'List',
    'page callback' => 'panels_mini_list_page',
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  ) + $base;
  $items['admin/panels/panel-mini/add'] = array(
    'title' => 'Add',
    'page callback' => 'panels_mini_add_page',
    'type' => MENU_LOCAL_TASK,
  ) + $base;
  $items['admin/panels/panel-mini/import'] = array(
    'title' => 'Import',
    'page callback' => 'panels_mini_import_mini',
    'type' => MENU_LOCAL_TASK,
  ) + $base;
  $items['admin/panels/panel-mini/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'panels_mini_settings',
    'type' => MENU_LOCAL_TASK,
  ) + $base;
  $items['admin/panels/panel-mini/disable'] = array(
    'page callback' => 'panels_mini_disable_page',
    'weight' => -1,
    'type' => MENU_CALLBACK,
  ) + $base;
  $items['admin/panels/panel-mini/enable'] = array(
    'page callback' => 'panels_mini_enable_page',
    'weight' => -1,
    'type' => MENU_CALLBACK,
  ) + $base;
  $base['access arguments'] = array(
    'administer mini panels',
  );
  $items['admin/panels/panel-mini/%panels_mini_admin'] = array(
    'title' => 'Preview',
    'page callback' => 'panels_mini_preview_panel',
    'page arguments' => array(
      3,
    ),
    'weight' => -10,
    'type' => MENU_CALLBACK,
  ) + $base;
  $items['admin/panels/panel-mini/%panels_mini_admin/preview'] = array(
    'title' => 'Preview',
    'page callback' => 'panels_mini_preview_panel',
    'page arguments' => array(
      3,
    ),
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  ) + $base;
  $items['admin/panels/panel-mini/%panels_mini_admin/edit-layout'] = array(
    'title' => 'Layout',
    'page callback' => 'panels_mini_edit_layout',
    'page arguments' => array(
      3,
    ),
    'weight' => -9,
    'type' => MENU_LOCAL_TASK,
  ) + $base;
  $items['admin/panels/panel-mini/%panels_mini_admin/edit-general'] = array(
    'title' => 'Settings',
    'page callback' => 'panels_mini_edit',
    'page arguments' => array(
      3,
    ),
    'weight' => -5,
    'type' => MENU_LOCAL_TASK,
  ) + $base;
  $items['admin/panels/panel-mini/%panels_mini_admin/edit-settings'] = array(
    'title' => 'Layout settings',
    'page callback' => 'panels_mini_edit_layout_settings',
    'page arguments' => array(
      3,
    ),
    'weight' => -3,
    'type' => MENU_LOCAL_TASK,
  ) + $base;
  $items['admin/panels/panel-mini/%panels_mini_admin/edit-context'] = array(
    'title' => 'Context',
    'page callback' => 'panels_mini_edit_context',
    'page arguments' => array(
      3,
    ),
    'weight' => -2,
    'type' => MENU_LOCAL_TASK,
  ) + $base;
  $items['admin/panels/panel-mini/%panels_mini_admin/edit-content'] = array(
    'title' => 'Content',
    'page callback' => 'panels_mini_edit_content',
    'page arguments' => array(
      3,
    ),
    'weight' => -1,
    'type' => MENU_LOCAL_TASK,
  ) + $base;
  $items['admin/panels/panel-mini/%panels_mini_admin/export'] = array(
    'title' => 'Export',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'panels_mini_edit_export',
      3,
    ),
    'weight' => 0,
    'type' => MENU_LOCAL_TASK,
  ) + $base;
  $items['admin/panels/panel-mini/%panels_mini_admin/delete'] = array(
    'title' => 'Delete mini panel',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'panels_mini_delete_confirm',
      3,
    ),
    'type' => MENU_CALLBACK,
  ) + $base;
  return $items;
}