You are here

public function deploy_ui_plan::hook_menu in Deploy - Content Staging 7.3

Same name and namespace in other branches
  1. 7.2 modules/deploy_ui/plugins/export_ui/deploy_ui_plan.class.php \deploy_ui_plan::hook_menu()

Implements CTools psuedo hook_menu_alter().

Overrides ctools_export_ui::hook_menu

File

modules/deploy_ui/plugins/export_ui/deploy_ui_plan.class.php, line 17
Deploy UI for managing deployment plans.

Class

deploy_ui_plan
CTools Export UI class for deployment plans.

Code

public function hook_menu(&$items) {
  parent::hook_menu($items);

  // Hack around some of the limitations of the CTools Exportable UI default implementation.
  $items['admin/structure/deploy'] = $items['admin/structure/deploy/plans'];
  $items['admin/structure/deploy']['description'] = 'Manage deployment plans, endpoints etc.';
  $items['admin/structure/deploy']['title'] = 'Deploy';
  $items['admin/structure/deploy']['type'] = MENU_NORMAL_ITEM;
  $items['admin/structure/deploy/plans']['type'] = MENU_DEFAULT_LOCAL_TASK;
  $items['admin/structure/deploy/plans']['weight'] = -10;
  $items['admin/structure/deploy/plans/list/%ctools_export_ui/edit'] = $items['admin/structure/deploy/plans/list/%ctools_export_ui'];
  $items['admin/structure/deploy/plans/list/%ctools_export_ui/edit']['title'] = 'Edit';
  $items['admin/structure/deploy/plans/list/%ctools_export_ui/edit']['type'] = MENU_LOCAL_TASK;
  $items['admin/structure/deploy/plans/list/%ctools_export_ui/edit']['weight'] = 0;
  $items['admin/structure/deploy/plans/list/%ctools_export_ui']['title'] = 'View';
  $items['admin/structure/deploy/plans/list/%ctools_export_ui']['page arguments'][1] = 'view';
  $items['admin/structure/deploy/plans/list/%ctools_export_ui']['access arguments'][1] = 'view';
  $items['admin/structure/deploy/plans/list/%ctools_export_ui/view']['type'] = MENU_DEFAULT_LOCAL_TASK;

  /*
      We need to sort the menu items to ensure the parent exists before the
      children are added. Without the menu is broken.
  */
  ksort($items);
}