You are here

function panels_node_menu in Panels 6.2

Same name and namespace in other branches
  1. 5.2 panels_node/panels_node.module \panels_node_menu()
  2. 6.3 panels_node/panels_node.module \panels_node_menu()
  3. 7.3 panels_node/panels_node.module \panels_node_menu()

Implementation of hook_menu().

File

panels_node/panels_node.module, line 25
panels_node.module

Code

function panels_node_menu() {

  /*
    $items['node/add/panel'] = array(
      'title' => 'Panel',
      'access arguments' => array('create panel-nodes'),
      'type' => MENU_NORMAL_ITEM,
    );
  */
  $items['admin/panels/panel-nodes'] = array(
    'title' => 'Panel nodes',
    'access arguments' => array(
      'create panel-nodes',
    ),
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'panels_node_admin',
    'description' => 'Panel nodes are nodes that are laid out with panel displays.',
  );
  $items['admin/panels/panel-nodes/information'] = array(
    'title' => 'Information',
    'access arguments' => array(
      'create panel-nodes',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/panels/panel-nodes/settings'] = array(
    'title' => 'Settings',
    'description' => 'Configure which content is available to add to panel node displays.',
    'access arguments' => array(
      'administer panel-nodes',
    ),
    'page callback' => 'panels_node_settings',
    'type' => MENU_LOCAL_TASK,
  );

  // Avoid some repetition on these:
  $base = array(
    'access callback' => 'panels_node_edit_node',
    'access arguments' => array(
      1,
    ),
    'page arguments' => array(
      1,
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['node/%node/panel_layout'] = array(
    'path' => $base . 'layout',
    'title' => 'Panel layout',
    'page callback' => 'panels_node_edit_layout',
    'weight' => 2,
  ) + $base;
  $items['node/%node/panel_settings'] = array(
    'title' => 'Panel layout settings',
    'page callback' => 'panels_node_edit_layout_settings',
    'weight' => 2,
  ) + $base;
  $items['node/%node/panel_content'] = array(
    'title' => 'Panel content',
    'page callback' => 'panels_node_edit_content',
    'weight' => 3,
  ) + $base;
  $items['node/add/panel/choose-layout'] = array(
    'title' => 'Choose layout',
    'access arguments' => array(
      'create panel-nodes',
    ),
    'page callback' => 'panels_node_add',
    'type' => MENU_CALLBACK,
  );
  return $items;
}