diff --git a/core/modules/menu/lib/Drupal/menu/MenuListController.php b/core/modules/menu/lib/Drupal/menu/MenuListController.php index 806ef6f..1ccf212 100644 --- a/core/modules/menu/lib/Drupal/menu/MenuListController.php +++ b/core/modules/menu/lib/Drupal/menu/MenuListController.php @@ -15,7 +15,7 @@ class MenuListController extends ConfigEntityListController { /** - * Overrides Drupal\Core\Entity\EntityListController::buildHeader(). + * Overrides \Drupal\Core\Entity\EntityListController::buildHeader(). */ public function buildHeader() { $row['title'] = t('Title'); @@ -24,7 +24,7 @@ public function buildHeader() { } /** - * Overrides Drupal\Core\Entity\EntityListController::buildRow(). + * Overrides \Drupal\Core\Entity\EntityListController::buildRow(). */ public function buildRow(EntityInterface $entity) { $row['title'] = array( @@ -40,7 +40,7 @@ public function buildRow(EntityInterface $entity) { } /** - * Implements Drupal\Core\Entity\EntityListController::getOperations(); + * Overrides \Drupal\Core\Entity\EntityListController::getOperations(); */ public function getOperations(EntityInterface $menu) { $uri = $menu->uri(); @@ -49,17 +49,20 @@ public function getOperations(EntityInterface $menu) { $operations['list'] = array( 'title' => t('list links'), 'href' => $path, + 'options' => $uri['options'], 'weight' => 0, ); $operations['edit'] = array( 'title' => t('edit menu'), 'href' => $path . '/edit', - 'weight' => 5, + 'options' => $uri['options'], + 'weight' => 10, ); $operations['add'] = array( 'title' => t('add link'), 'href' => $path . '/add', - 'weight' => 10, + 'options' => $uri['options'], + 'weight' => 20, ); return $operations; } diff --git a/core/modules/menu/menu.admin.css b/core/modules/menu/menu.admin.css index 8717aca..cb116ba 100644 --- a/core/modules/menu/menu.admin.css +++ b/core/modules/menu/menu.admin.css @@ -1,6 +1,3 @@ -.menu-operations { - width: 100px; -} .menu-enabled { width: 70px; } diff --git a/core/modules/menu/menu.install b/core/modules/menu/menu.install index 1e0b67b..a76207b 100644 --- a/core/modules/menu/menu.install +++ b/core/modules/menu/menu.install @@ -5,6 +5,8 @@ * Install, update and uninstall functions for the menu module. */ +use Drupal\Component\Uuid\Uuid; + /** * Implements hook_uninstall(). */ @@ -74,11 +76,13 @@ function menu_update_8003() { * @ingroup config_upgrade */ function menu_update_8004() { + $uuid = new Uuid(); $result = db_query('SELECT * FROM {menu_custom}'); foreach ($result as $menu) { // Save the config object. config('menu.menu.' . $menu->menu_name) ->set('id', $menu->menu_name) + ->set('uuid', $uuid->generate()) ->set('label', $menu->title) ->set('description', $menu->description) ->save(); diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index c643158..154f3b1 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -11,11 +11,10 @@ * URLs to be added to the main site navigation menu. */ -use Symfony\Component\HttpFoundation\JsonResponse; use Drupal\node\Plugin\Core\Entity\Node; use Drupal\system\Plugin\Core\Entity\Menu; use Drupal\system\Plugin\block\block\SystemMenuBlock; -use Drupal\Core\Config\Entity\ConfigEntityBase; +use Symfony\Component\HttpFoundation\JsonResponse; /** * Maximum length of menu name as entered by the user. Database length is 32 @@ -173,7 +172,7 @@ function menu_entity_info_alter(&$entity_info) { /** * Entity URI callback. * - * @param Drupal\system\Plugin\Core\Entity\Menu $menu + * @param \Drupal\system\Plugin\Core\Entity\Menu $menu * A Menu entity. */ function menu_uri(Menu $menu) { @@ -242,7 +241,7 @@ function menu_load($menu_name) { /** * Save a custom menu. * - * @param Drupal\system\Plugin\Core\Entity\Menu $menu + * @param \Drupal\system\Plugin\Core\Entity\Menu $menu * An array representing a custom menu: * - menu_name: The unique name of the custom menu (composed of lowercase * letters, numbers, and hyphens). @@ -294,7 +293,7 @@ function menu_save($menu_array) { * function should usually be called from a user interface (form submit) handler * only, which allows the user to confirm the action. * - * @param Drupal\system\Plugin\Core\Entity\Menu $menu + * @param \Drupal\system\Plugin\Core\Entity\Menu $menu * An array representing a custom menu: * - menu_name: The unique name of the custom menu. * - title: The human readable menu title. diff --git a/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/Menu.php b/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/Menu.php index bafdf0f..7e3ceb0 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/Menu.php +++ b/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/Menu.php @@ -37,7 +37,7 @@ class Menu extends ConfigEntityBase { public $id; /** - * The file UUID. + * The menu UUID. * * @var string */