Commit 62ba47d2 authored by alexpott's avatar alexpott
Browse files

Revert "Issue #2085243 by dawehner: Rename Menu module into Menu UI module."

This reverts commit 07f63fe6.
parent f122f874
......@@ -2,16 +2,16 @@
"use strict";
Drupal.behaviors.menuUiChangeParentItems = {
Drupal.behaviors.menuChangeParentItems = {
attach: function (context, settings) {
var $menu = $('#edit-menu');
$menu.once('menu-parent', function () {
// Update the list of available parent menu items to match the initial
// available menus.
Drupal.menuUiUpdateParentList();
Drupal.menuUpdateParentList();
// Update list of available parent menu items.
$menu.on('change', 'input', Drupal.menuUiUpdateParentList);
$menu.on('change', 'input', Drupal.menuUpdateParentList);
});
}
};
......@@ -19,7 +19,7 @@
/**
* Function to set the options of the menu parent item dropdown.
*/
Drupal.menuUiUpdateParentList = function () {
Drupal.menuUpdateParentList = function () {
var $menu = $('#edit-menu');
var values = [];
......
menu_ui_edit:
menu_edit:
title: 'Edit menu'
route_name: 'menu_ui.menu_edit'
route_name: 'menu.menu_edit'
group: menu
name: Menu Ui
name: Menu
type: module
description: 'Allows administrators to customize the site navigation menu.'
package: Core
version: VERSION
core: 8.x
configure: menu_ui.overview_page
configure: menu.overview_page
dependencies:
- menu_link
......@@ -2,7 +2,7 @@
/**
* @file
* Install, update and uninstall functions for the menu_ui module.
* Install, update and uninstall functions for the menu module.
*/
use Drupal\Component\Uuid\Uuid;
......@@ -10,7 +10,7 @@
/**
* Implements hook_install().
*/
function menu_ui_install() {
function menu_install() {
// Rebuild all the menu data.
// @todo - remove this when we understand why removing it breaks the
// standard install profile, possibly need to be handled in
......@@ -31,6 +31,6 @@ function menu_ui_install() {
/**
* Implements hook_uninstall().
*/
function menu_ui_uninstall() {
function menu_uninstall() {
\Drupal::service('router.builder')->setRebuildNeeded();
}
......@@ -2,7 +2,7 @@
"use strict";
Drupal.behaviors.menuUiDetailsSummaries = {
Drupal.behaviors.menuDetailsSummaries = {
attach: function (context) {
$(context).find('.menu-link-form').drupalSetSummary(function (context) {
var $context = $(context);
......@@ -19,7 +19,7 @@
/**
* Automatically fill in a menu link title, if possible.
*/
Drupal.behaviors.menuUiLinkAutomaticTitle = {
Drupal.behaviors.menuLinkAutomaticTitle = {
attach: function (context) {
var $context = $(context);
$context.find('.menu-link-form').each(function () {
......
drupal.menu_ui:
drupal.menu:
version: VERSION
js:
menu_ui.js: {}
menu.js: {}
dependencies:
- core/jquery
- core/drupal
- core/drupal.form
drupal.menu_ui.admin:
drupal.menu.admin:
version: VERSION
js:
menu_ui.admin.js: {}
menu.admin.js: {}
dependencies:
- core/jquery
- core/drupal
menu_ui_link_add:
route_name: menu_ui.link_add
menu_link_add:
route_name: menu.link_add
title: 'Add link'
appears_on:
- menu_ui.menu_edit
- menu.menu_edit
menu_ui.menu_add:
route_name: menu_ui.menu_add
menu.menu_add:
route_name: menu.menu_add
title: 'Add menu'
appears_on:
- menu_ui.overview_page
- menu.overview_page
menu.menu_edit:
title: 'Edit menu'
route_name: menu.menu_edit
base_route: menu.menu_edit
menu.overview_page:
title: 'List'
route_name: menu.overview_page
base_route: menu.overview_page
menu.settings:
title: 'Settings'
route_name: menu.settings
base_route: menu.overview_page
weight: 100
menu_ui.overview_page:
menu.overview_page:
title: Menus
description: 'Add new menus to your site, edit existing menus, and rename and reorganize menu links.'
route_name: menu_ui.overview_page
route_name: menu.overview_page
parent: system.admin_structure
......@@ -30,16 +30,16 @@
/**
* Implements hook_help().
*/
function menu_ui_help($path, $arg) {
function menu_help($path, $arg) {
switch ($path) {
case 'admin/help#menu_ui':
case 'admin/help#menu':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Menu module provides an interface for managing menus. A menu is a hierarchical collection of links, which can be within or external to the site, generally used for navigation. For more information, see the <a href="!menu">online documentation for the Menu module</a>.', array('!menu' => 'https://drupal.org/documentation/modules/menu/')) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Managing menus') . '</dt>';
$output .= '<dd>' . t('Users with the <em>Administer menus and menu items</em> permission can add, edit, and delete custom menus on the <a href="!menu">Menus page</a>. Custom menus can be special site menus, menus of external links, or any combination of internal and external links. You may create an unlimited number of additional menus, each of which will automatically have an associated block (if you have the <a href="!block_help">Block module</a> installed). By selecting <em>Edit menu</em>, you can add, edit, or delete links for a given menu. The links listing page provides a drag-and-drop interface for controlling the order of links, and creating a hierarchy within the menu.', array('!block_help' => \Drupal::url('help.page', array('name' => 'block')), '!menu' => \Drupal::url('menu_ui.overview_page'))) . '</dd>';
$output .= '<dd>' . t('Users with the <em>Administer menus and menu items</em> permission can add, edit, and delete custom menus on the <a href="!menu">Menus page</a>. Custom menus can be special site menus, menus of external links, or any combination of internal and external links. You may create an unlimited number of additional menus, each of which will automatically have an associated block (if you have the <a href="!block_help">Block module</a> installed). By selecting <em>Edit menu</em>, you can add, edit, or delete links for a given menu. The links listing page provides a drag-and-drop interface for controlling the order of links, and creating a hierarchy within the menu.', array('!block_help' => \Drupal::url('help.page', array('name' => 'block')), '!menu' => \Drupal::url('menu.overview_page'))) . '</dd>';
$output .= '<dt>' . t('Displaying menus') . '</dt>';
$output .= '<dd>' . t('If you have the Block module enabled, then each menu that you create is rendered in a block that you enable and position on the <a href="!blocks">Block layout page</a>. In some <a href="!themes">themes</a>, the main menu and possibly the secondary menu will be output automatically; you may be able to disable this behavior on the <a href="!themes">theme\'s settings page</a>.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '!themes' => \Drupal::url('system.themes_page'), '!theme_settings' => \Drupal::url('system.theme_settings'))) . '</dd>';
$output .= '</dl>';
......@@ -56,7 +56,7 @@ function menu_ui_help($path, $arg) {
/**
* Implements hook_permission().
*/
function menu_ui_permission() {
function menu_permission() {
return array(
'administer menu' => array(
'title' => t('Administer menus and menu items'),
......@@ -67,27 +67,27 @@ function menu_ui_permission() {
/**
* Implements hook_entity_type_build().
*/
function menu_ui_entity_type_build(array &$entity_types) {
function menu_entity_type_build(array &$entity_types) {
/** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
$entity_types['menu']
->setFormClass('add', 'Drupal\menu_ui\MenuFormController')
->setFormClass('edit', 'Drupal\menu_ui\MenuFormController')
->setFormClass('delete', 'Drupal\menu_ui\Form\MenuDeleteForm')
->setListBuilderClass('Drupal\menu_ui\MenuListBuilder')
->setLinkTemplate('add-form', 'menu_ui.link_add')
->setLinkTemplate('delete-form', 'menu_ui.delete_menu')
->setLinkTemplate('edit-form', 'menu_ui.menu_edit');
->setFormClass('add', 'Drupal\menu\MenuFormController')
->setFormClass('edit', 'Drupal\menu\MenuFormController')
->setFormClass('delete', 'Drupal\menu\Form\MenuDeleteForm')
->setListBuilderClass('Drupal\menu\MenuListBuilder')
->setLinkTemplate('add-form', 'menu.link_add')
->setLinkTemplate('delete-form', 'menu.delete_menu')
->setLinkTemplate('edit-form', 'menu.menu_edit');
$entity_types['menu_link']
->setFormClass('delete', 'Drupal\menu_ui\Form\MenuLinkDeleteForm')
->setFormClass('reset', 'Drupal\menu_ui\Form\MenuLinkResetForm')
->setLinkTemplate('delete-form', 'menu_ui.link_delete');
->setFormClass('delete', 'Drupal\menu\Form\MenuLinkDeleteForm')
->setFormClass('reset', 'Drupal\menu\Form\MenuLinkResetForm')
->setLinkTemplate('delete-form', 'menu.link_delete');
}
/**
* Implements hook_entity_bundle_info().
*/
function menu_ui_entity_bundle_info() {
function menu_entity_bundle_info() {
$bundles = array();
$config_names = \Drupal::configFactory()->listAll('system.menu.');
foreach ($config_names as $config_name) {
......@@ -103,10 +103,10 @@ function menu_ui_entity_bundle_info() {
/**
* Implements hook_theme().
*/
function menu_ui_theme() {
function menu_theme() {
return array(
'menu_overview_form' => array(
'file' => 'menu_ui.admin.inc',
'file' => 'menu.admin.inc',
'render element' => 'form',
),
);
......@@ -120,14 +120,14 @@ function menu_ui_theme() {
* @return
* Array defining the custom menu, or NULL if the menu doesn't exist.
*/
function menu_ui_load($menu_name) {
function menu_load($menu_name) {
return entity_load('menu', $menu_name);
}
/**
* Implements hook_menu_insert()
*/
function menu_ui_menu_insert(Menu $menu) {
function menu_menu_insert(Menu $menu) {
menu_cache_clear_all();
// Invalidate the block cache to update menu-based derivatives.
if (\Drupal::moduleHandler()->moduleExists('block')) {
......@@ -143,7 +143,7 @@ function menu_ui_menu_insert(Menu $menu) {
// See menu_set_active_menu_names().
$config = \Drupal::config('system.menu');
$active_menus = $config->get('active_menus_default') ?: array_keys(menu_ui_get_menus());
$active_menus = $config->get('active_menus_default') ?: array_keys(menu_get_menus());
if (!in_array($menu->id(), $active_menus)) {
$active_menus[] = $menu->id();
$config
......@@ -155,7 +155,7 @@ function menu_ui_menu_insert(Menu $menu) {
/**
* Implements hook_menu_update().
*/
function menu_ui_menu_update(Menu $menu) {
function menu_menu_update(Menu $menu) {
menu_cache_clear_all();
// Invalidate the block cache to update menu-based derivatives.
if (\Drupal::moduleHandler()->moduleExists('block')) {
......@@ -166,13 +166,13 @@ function menu_ui_menu_update(Menu $menu) {
/**
* Implements hook_menu_predelete().
*/
function menu_ui_menu_predelete(Menu $menu) {
function menu_menu_predelete(Menu $menu) {
// Delete all links from the menu.
menu_delete_links($menu->id());
// Remove menu from active menus variable.
$config = \Drupal::config('system.menu');
$active_menus = $config->get('active_menus_default') ?: array_keys(menu_ui_get_menus());
$active_menus = $config->get('active_menus_default') ?: array_keys(menu_get_menus());
if (in_array($menu->id(), $active_menus)) {
$active_menus = array_diff($active_menus, array($menu->id()));
// Prevent the gap left by the removed menu from causing array indices to
......@@ -187,7 +187,7 @@ function menu_ui_menu_predelete(Menu $menu) {
/**
* Implements hook_menu_delete().
*/
function menu_ui_menu_delete(Menu $menu) {
function menu_menu_delete(Menu $menu) {
menu_cache_clear_all();
// Invalidate the block cache to update menu-based derivatives.
......@@ -201,7 +201,7 @@ function menu_ui_menu_delete(Menu $menu) {
* menu link.
*
* @param array $menus
* An array of menu names and titles, such as from menu_ui_get_menus().
* An array of menu names and titles, such as from menu_get_menus().
* @param \Drupal\menu_link\Entity\MenuLink $menu_link
* The menu link for which to generate a list of parents.
* If $menu_link->id() == 0 then the complete tree is returned.
......@@ -216,12 +216,12 @@ function menu_ui_menu_delete(Menu $menu) {
* @todo This has to be turned into a #process form element callback. The
* 'override_parent_selector' variable is entirely superfluous.
*/
function menu_ui_parent_options(array $menus, MenuLink $menu_link = NULL, $type = NULL) {
function menu_parent_options(array $menus, MenuLink $menu_link = NULL, $type = NULL) {
// The menu_links table can be practically any size and we need a way to
// allow contrib modules to provide more scalable pattern choosers.
// hook_form_alter is too late in itself because all the possible parents are
// retrieved here, unless override_parent_selector is set to TRUE.
if (\Drupal::config('menu_ui.settings')->get('override_parent_selector')) {
if (\Drupal::config('menu.settings')->get('override_parent_selector')) {
return array();
}
......@@ -242,19 +242,19 @@ function menu_ui_parent_options(array $menus, MenuLink $menu_link = NULL, $type
}
}
return _menu_ui_get_options($menus, $available_menus, $menu_link);
return _menu_get_options($menus, $available_menus, $menu_link);
}
/**
* Helper function to get the items of the given menu.
*/
function _menu_ui_get_options($menus, $available_menus, $item) {
function _menu_get_options($menus, $available_menus, $item) {
// If the item has children, there is an added limit to the depth of valid parents.
if (isset($item['parent_depth_limit'])) {
$limit = $item['parent_depth_limit'];
}
else {
$limit = _menu_ui_parent_depth_limit($item);
$limit = _menu_parent_depth_limit($item);
}
/** @var \Drupal\menu_link\MenuTreeInterface $menu_tree */
......@@ -265,16 +265,16 @@ function _menu_ui_get_options($menus, $available_menus, $item) {
if (isset($available_menus[$menu_name])) {
$tree = $menu_tree->buildAllData($menu_name, NULL);
$options[$menu_name . ':0'] = '<' . $title . '>';
_menu_ui_parents_recurse($tree, $menu_name, '--', $options, $item['mlid'], $limit);
_menu_parents_recurse($tree, $menu_name, '--', $options, $item['mlid'], $limit);
}
}
return $options;
}
/**
* Recursive helper function for menu_ui_parent_options().
* Recursive helper function for menu_parent_options().
*/
function _menu_ui_parents_recurse($tree, $menu_name, $indent, &$options, $exclude, $depth_limit) {
function _menu_parents_recurse($tree, $menu_name, $indent, &$options, $exclude, $depth_limit) {
foreach ($tree as $data) {
if ($data['link']['depth'] > $depth_limit) {
// Don't iterate through any links on this level.
......@@ -287,7 +287,7 @@ function _menu_ui_parents_recurse($tree, $menu_name, $indent, &$options, $exclud
}
$options[$menu_name . ':' . $data['link']['mlid']] = $title;
if ($data['below']) {
_menu_ui_parents_recurse($data['below'], $menu_name, $indent . '--', $options, $exclude, $depth_limit);
_menu_parents_recurse($data['below'], $menu_name, $indent . '--', $options, $exclude, $depth_limit);
}
}
}
......@@ -296,7 +296,7 @@ function _menu_ui_parents_recurse($tree, $menu_name, $indent, &$options, $exclud
/**
* Implements hook_block_view_BASE_BLOCK_ID_alter() for 'system_menu_block'.
*/
function menu_ui_block_view_system_menu_block_alter(array &$build, BlockPluginInterface $block) {
function menu_block_view_system_menu_block_alter(array &$build, BlockPluginInterface $block) {
// Add contextual links for system menu blocks.
$menus = menu_list_system_menus();
$menu_name = $block->getDerivativeId();
......@@ -312,21 +312,21 @@ function menu_ui_block_view_system_menu_block_alter(array &$build, BlockPluginIn
/**
* Implements hook_node_insert().
*/
function menu_ui_node_insert(EntityInterface $node) {
menu_ui_node_save($node);
function menu_node_insert(EntityInterface $node) {
menu_node_save($node);
}
/**
* Implements hook_node_update().
*/
function menu_ui_node_update(EntityInterface $node) {
menu_ui_node_save($node);
function menu_node_update(EntityInterface $node) {
menu_node_save($node);
}
/**
* Implements hook_node_type_insert().
*/
function menu_ui_node_type_insert(NodeTypeInterface $type) {
function menu_node_type_insert(NodeTypeInterface $type) {
if ($type->isSyncing()) {
return;
}
......@@ -339,7 +339,7 @@ function menu_ui_node_type_insert(NodeTypeInterface $type) {
/**
* Implements hook_node_type_delete().
*/
function menu_ui_node_type_delete(NodeTypeInterface $type) {
function menu_node_type_delete(NodeTypeInterface $type) {
if ($type->isSyncing()) {
return;
}
......@@ -349,7 +349,7 @@ function menu_ui_node_type_delete(NodeTypeInterface $type) {
/**
* Helper for hook_node_insert() and hook_node_update().
*/
function menu_ui_node_save(EntityInterface $node) {
function menu_node_save(EntityInterface $node) {
if (isset($node->menu)) {
$link = &$node->menu;
if (empty($link['enabled'])) {
......@@ -378,7 +378,7 @@ function menu_ui_node_save(EntityInterface $node) {
/**
* Implements hook_node_predelete().
*/
function menu_ui_node_predelete(EntityInterface $node) {
function menu_node_predelete(EntityInterface $node) {
// Delete all menu module links that point to this node.
$query = \Drupal::entityQuery('menu_link')
->condition('link_path', 'node/' . $node->id())
......@@ -393,7 +393,7 @@ function menu_ui_node_predelete(EntityInterface $node) {
/**
* Implements hook_node_prepare_form().
*/
function menu_ui_node_prepare_form(NodeInterface $node, $operation, array &$form_state) {
function menu_node_prepare_form(NodeInterface $node, $operation, array &$form_state) {
if (empty($node->menu)) {
// Prepare the node for the edit form so that $node->menu always exists.
$node_type_config = \Drupal::config('menu.entity.node.' . $node->getType());
......@@ -407,7 +407,7 @@ function menu_ui_node_prepare_form(NodeInterface $node, $operation, array &$form
$query = \Drupal::entityQuery('menu_link')
->condition('link_path', 'node/' . $node->id())
->condition('menu_name', $menu_name)
->condition('module', 'menu_ui')
->condition('module', 'menu')
->sort('mlid', 'ASC')
->range(0, 1);
$result = $query->execute();
......@@ -419,7 +419,7 @@ function menu_ui_node_prepare_form(NodeInterface $node, $operation, array &$form
$query = \Drupal::entityQuery('menu_link')
->condition('link_path', 'node/' . $node->id())
->condition('menu_name', array_values($type_menus), 'IN')
->condition('module', 'menu_ui')
->condition('module', 'menu')
->sort('mlid', 'ASC')
->range(0, 1);
$result = $query->execute();
......@@ -443,14 +443,14 @@ function menu_ui_node_prepare_form(NodeInterface $node, $operation, array &$form
}
// Find the depth limit for the parent select.
if (!isset($node->menu['parent_depth_limit'])) {
$node->menu['parent_depth_limit'] = _menu_ui_parent_depth_limit($node->menu);
$node->menu['parent_depth_limit'] = _menu_parent_depth_limit($node->menu);
}
}
/**
* Find the depth limit for items in the parent select.
*/
function _menu_ui_parent_depth_limit($item) {
function _menu_parent_depth_limit($item) {
return MENU_MAX_DEPTH - 1 - (($item['mlid'] && $item['has_children']) ? entity_get_controller('menu_link')->findChildrenRelativeDepth($item) : 0);
}
......@@ -459,15 +459,15 @@ function _menu_ui_parent_depth_limit($item) {
*
* Adds menu item fields to the node form.
*
* @see menu_ui_node_submit()
* @see menu_node_submit()
*/
function menu_ui_form_node_form_alter(&$form, $form_state) {
function menu_form_node_form_alter(&$form, $form_state) {
// Generate a list of possible parents (not including this link or descendants).
// @todo This must be handled in a #process handler.
$node = $form_state['controller']->getEntity();
$link = $node->menu;
$type = $node->getType();
$options = menu_ui_parent_options(menu_ui_get_menus(), $link, $type);
$options = menu_parent_options(menu_get_menus(), $link, $type);
// If no possible parent menu items were found, there is nothing to display.
if (empty($options)) {
return;
......@@ -560,9 +560,9 @@ function menu_ui_form_node_form_alter(&$form, $form_state) {
/**
* Implements hook_node_submit().
*
* @see menu_ui_form_node_form_alter()
* @see menu_form_node_form_alter()
*/
function menu_ui_node_submit(EntityInterface $node, $form, $form_state) {
function menu_node_submit(EntityInterface $node, $form, $form_state) {
if (!empty($form_state['values']['menu'])) {
$node->menu = entity_create('menu_link', $form_state['values']['menu']);
// Decompose the selected menu parent option into 'menu_name' and 'plid', if
......@@ -579,10 +579,10 @@ function menu_ui_node_submit(EntityInterface $node, $form, $form_state) {
* Adds menu options to the node type form.
*
* @see NodeTypeFormController::form().
* @see menu_ui_form_node_type_form_submit().
* @see menu_form_node_type_form_submit().
*/
function menu_ui_form_node_type_form_alter(&$form, $form_state) {
$menu_options = menu_ui_get_menus();
function menu_form_node_type_form_alter(&$form, $form_state) {
$menu_options = menu_get_menus();
$type = $form_state['controller']->getEntity();
if ($type->id()) {
$config_values = \Drupal::config('menu.entity.node.' . $type->id())->get();
......@@ -611,9 +611,9 @@ function menu_ui_form_node_type_form_alter(&$form, $form_state) {
// To avoid an 'illegal option' error after saving the form we have to load
// all available menu items.
// Otherwise it is not possible to dynamically add options to the list.
// @todo Convert menu_ui_parent_options() into a #process callback.
// @todo Convert menu_parent_options() into a #process callback.
$menu_link = entity_create('menu_link', array('mlid' => 0));
$options = menu_ui_parent_options(menu_ui_get_menus(), $menu_link);
$options = menu_parent_options(menu_get_menus(), $menu_link);
$form['menu']['menu_parent'] = array(
'#type' => 'select',
'#title' => t('Default parent item'),
......@@ -623,15 +623,15 @@ function menu_ui_form_node_type_form_alter(&$form, $form_state) {
'#attributes' => array('class' => array('menu-title-select')),
);
$form['actions']['submit']['#submit'][] = 'menu_ui_form_node_type_form_submit';
$form['actions']['submit']['#submit'][] = 'menu_form_node_type_form_submit';
}
/**
* Submit handler for forms with menu options.
*
* @see menu_ui_form_node_type_form_alter().
* @see menu_form_node_type_form_alter().
*/
function menu_ui_form_node_type_form_submit(&$form, $form_state) {
function menu_form_node_type_form_submit(&$form, $form_state) {
$type = $form_state['controller']->getEntity();
\Drupal::config('menu.entity.node.' . $type->id())
->set('available_menus', array_values(array_filter($form_state['values']['menu_options'])))
......@@ -649,7 +649,7 @@ function menu_ui_form_node_type_form_submit(&$form, $form_state) {
* An array with the machine-readable names as the keys, and human-readable
* titles as the values.
*/
function menu_ui_get_menus($all = TRUE) {
function menu_get_menus($all = TRUE) {
if ($custom_menus = entity_load_multiple('menu')) {
if (!$all) {
$custom_menus = array_diff_key($custom_menus, menu_list_system_menus());
......@@ -665,8 +665,8 @@ function menu_ui_get_menus($all = TRUE) {
/**
* Implements hook_preprocess_HOOK() for block templates.
*/
function menu_ui_preprocess_block(&$variables) {
if ($variables['configuration']['provider'] == 'menu_ui') {
function menu_preprocess_block(&$variables) {
if ($variables['configuration']['provider'] == 'menu') {
$variables['attributes']['role'] = 'navigation';
}
}
menu_ui.settings:
menu.settings:
path: '/admin/structure/menu/settings'
defaults:
_form: 'Drupal\menu_ui\MenuSettingsForm'
_form: 'Drupal\menu\MenuSettingsForm'
_title: 'Menus'
requirements:
_permission: 'administer menu'
menu_ui.overview_page:
menu.overview_page:
path: '/admin/structure/menu'
defaults:
_entity_list: 'menu'
......@@ -14,22 +14,22 @@ menu_ui.overview_page:
requirements:
_permission: 'administer menu'
menu_ui.parent_options_js:
menu.parent_options_js:
path: '/admin/structure/menu/parents'
defaults:
_controller: '\Drupal\menu_ui\Controller\MenuController::getParentOptions'
_controller: '\Drupal\menu\Controller\MenuController::getParentOptions'
requirements:
_permission: 'administer menu'
menu_ui.link_add:
menu.link_add:
path: '/admin/structure/menu/manage/{menu}/add'
defaults:
_content: '\Drupal\menu_ui\Controller\MenuController::addLink'
_content: '\Drupal\menu\Controller\MenuController::addLink'
_title: 'Add menu link'
requirements:
_entity_create_access: 'menu_link'
menu_ui.link_edit:
menu.link_edit:
path: '/admin/structure/menu/item/{menu_link}/edit'
defaults: