You are here

function fieldable_panels_panes_menu in Fieldable Panels Panes (FPP) 7

Implements hook_menu().

File

./fieldable_panels_panes.module, line 218
Maintains an entity that appears as panel pane content.

Code

function fieldable_panels_panes_menu() {
  $items = array();
  $base = array(
    'access arguments' => array(
      'administer fieldable panels panes',
    ),
    'file' => 'includes/admin.inc',
  );

  // Legacy paths to support the old method of providing bundles via
  // entity_hook_info().
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes'] = array(
    'title callback' => 'fieldable_panels_panes_entity_title',
    'title arguments' => array(
      4,
    ),
    'page callback' => 'fieldable_panels_panes_entity_view_page',
    'page arguments' => array(
      4,
    ),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array(
      'view',
      4,
    ),
  ) + $base;
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/view'] = array(
    'title' => 'Preview',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'page callback' => 'fieldable_panels_panes_entity_view_page',
    'page arguments' => array(
      4,
    ),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array(
      'view',
      4,
    ),
    'weight' => -10,
  ) + $base;
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/edit'] = array(
    'title' => 'Edit',
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'page callback' => 'fieldable_panels_panes_entity_edit_page',
    'page arguments' => array(
      4,
    ),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array(
      'update',
      4,
    ),
    'weight' => -9,
  ) + $base;

  // Access control.
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/access'] = array(
    'title' => 'Access control',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'fieldable_panels_panes_entity_edit_access_page',
    'page arguments' => array(
      'view',
      4,
    ),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array(
      'update',
      4,
    ),
    'weight' => 10,
  ) + $base;
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/access/view'] = array(
    'title' => 'View',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/access/update'] = array(
    'title' => 'Edit',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'fieldable_panels_panes_entity_edit_access_page',
    'page arguments' => array(
      'edit',
      4,
    ),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array(
      'update',
      4,
    ),
    'weight' => 10,
  ) + $base;
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/delete'] = array(
    'title' => 'Delete',
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fieldable_panels_panes_entity_delete_form',
      4,
    ),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array(
      'delete',
      4,
    ),
    'weight' => -8,
  ) + $base;
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/revision'] = array(
    'title' => 'Revisions',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'fieldable_panels_panes_entity_list_revisions_page',
    'page arguments' => array(
      4,
    ),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array(
      'delete',
      4,
    ),
    'weight' => -7,
  ) + $base;
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/revision/%'] = array(
    'title callback' => 'fieldable_panels_panes_entity_title',
    'title arguments' => array(
      4,
    ),
    'page callback' => 'fieldable_panels_panes_entity_view_page',
    'page arguments' => array(
      4,
    ),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array(
      'view',
      4,
    ),
    'load arguments' => array(
      6,
    ),
  ) + $base;
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/revision/%/view'] = array(
    'title' => 'View',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'page callback' => 'fieldable_panels_panes_entity_view_page',
    'page arguments' => array(
      4,
    ),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array(
      'view',
      4,
    ),
    'load arguments' => array(
      6,
    ),
    'weight' => -10,
  ) + $base;
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/revision/%/edit'] = array(
    'title' => 'Edit',
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'page callback' => 'fieldable_panels_panes_entity_edit_page',
    'page arguments' => array(
      4,
    ),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array(
      'update',
      4,
    ),
    'weight' => -8,
    'load arguments' => array(
      6,
    ),
  ) + $base;
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/revision/%/delete'] = array(
    'title' => 'Delete',
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fieldable_panels_panes_entity_delete_revision_form',
      4,
    ),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array(
      'delete',
      4,
    ),
    'weight' => -7,
    'load arguments' => array(
      6,
    ),
  ) + $base;
  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/revision/%/make-current'] = array(
    'title' => 'Make current',
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_INLINE,
    'page callback' => 'fieldable_panels_panes_entity_make_current_page',
    'page arguments' => array(
      4,
    ),
    'access callback' => 'fieldable_panels_panes_entity_make_current_access',
    'access arguments' => array(
      4,
    ),
    'weight' => -8,
    'load arguments' => array(
      6,
    ),
  ) + $base;
  if (module_exists('devel')) {
    $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/devel'] = array(
      'title' => 'Devel',
      'page callback' => 'devel_load_object',
      'page arguments' => array(
        'fieldable_panels_pane',
        4,
      ),
      'access arguments' => array(
        'access devel information',
      ),
      'type' => MENU_LOCAL_TASK,
      'weight' => 100,
      'file' => 'devel.pages.inc',
      'file path' => drupal_get_path('module', 'devel'),
    );
    $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/devel/load'] = array(
      'title' => 'Load',
      'type' => MENU_DEFAULT_LOCAL_TASK,
    );
    $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/devel/render'] = array(
      'title' => 'Render',
      'page callback' => 'devel_render_object',
      // Normally this would be the name of the entity type, but slightly
      // modified in order to call the right function.
      'page arguments' => array(
        'fieldable_panels_panes',
        4,
      ),
      'access arguments' => array(
        'access devel information',
      ),
      'file' => 'devel.pages.inc',
      'file path' => drupal_get_path('module', 'devel'),
      'type' => MENU_LOCAL_TASK,
      'weight' => 100,
    );
  }
  $items['admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type'] = array(
    'title callback' => 'fieldable_panels_panes_entities_title',
    'title arguments' => array(
      3,
    ),
    'page callback' => 'fieldable_panels_panes_entities_list_page',
    'page arguments' => array(
      3,
    ),
  ) + $base;
  $items['admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type/add'] = array(
    'title' => 'Add fieldable panels pane',
    'page callback' => 'fieldable_panels_panes_entities_add_page',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array(
      'create',
      3,
    ),
    'type' => MENU_LOCAL_ACTION,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
  ) + $base;
  $items['admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type/list'] = array(
    'title' => 'List',
    'page callback' => 'fieldable_panels_panes_entities_list_page',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'fieldable_panels_panes_access_callback',
    'access arguments' => array(),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'weight' => -10,
  ) + $base;

  // Settings.
  $items['admin/structure/fieldable-panels-panes/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fieldable_panels_panes_settings',
    ),
    'type' => MENU_LOCAL_TASK,
  ) + $base;
  return $items;
}