diff --git a/core/modules/block/block.api.php b/core/modules/block/block.api.php index b7c3dab..f892c80 100644 --- a/core/modules/block/block.api.php +++ b/core/modules/block/block.api.php @@ -50,9 +50,9 @@ function hook_block_view_alter(array &$build, \Drupal\block\BlockPluginInterface * id, regardless of whether the plugin supports derivatives. For example, for * the \Drupal\system\Plugin\block\block\SystemPoweredByBlock block, this would * be 'system_powered_by_block' as per that class's annotation. And for the - * \Drupal\system\Plugin\block\block\SystemMenuBlock block, it would be - * 'system_menu_block' as per that class's annotation, regardless of which menu - * the derived block is for. + * \Drupal\menu\Plugin\Block\MenuBlock block, it would be 'menu_menu_block' as + * per that class's annotation, regardless of which menu the derived block is + * for. * * @param array $build * A renderable array of data, as returned from the build() implementation of diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockHtmlIdTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockHtmlIdTest.php index 31bce89..260e513 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockHtmlIdTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockHtmlIdTest.php @@ -39,7 +39,7 @@ function setUp() { \Drupal::state()->set('block_test.content', $current_content); // Enable our test blocks. - $this->drupalPlaceBlock('system_menu_block:menu-tools'); + $this->drupalPlaceBlock('menu_menu_block:tools'); $this->drupalPlaceBlock('test_html_id', array('machine_name' => 'test_id_block')); } diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockTemplateSuggestionsUnitTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockTemplateSuggestionsUnitTest.php index 9c2966f..75266a8 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockTemplateSuggestionsUnitTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockTemplateSuggestionsUnitTest.php @@ -38,7 +38,7 @@ function testBlockThemeHookSuggestions() { // and generates possibilities for each level of derivative. // @todo Clarify this comment. $block = entity_create('block', array( - 'plugin' => 'system_menu_block:menu-admin', + 'plugin' => 'menu_menu_block:admin', 'region' => 'footer', 'id' => \Drupal::config('system.theme')->get('default') . '.machinename', )); @@ -51,7 +51,7 @@ function testBlockThemeHookSuggestions() { // Test adding a class to the block content. $variables['content_attributes']['class'][] = 'test-class'; template_preprocess_block($variables); - $this->assertEqual($variables['theme_hook_suggestions'], array('block__system', 'block__system_menu_block', 'block__system_menu_block__menu_admin', 'block__machinename')); + $this->assertEqual($variables['theme_hook_suggestions'], array('block__system', 'block__menu_menu_block', 'block__menu_menu_block__admin', 'block__machinename')); $this->assertEqual($variables['content_attributes']['class'], array('test-class', 'content'), 'Default .content class added to block content_attributes'); } diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockUiTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockUiTest.php index 95cab30..e295149 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockUiTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockUiTest.php @@ -50,7 +50,7 @@ function setUp() { array( 'label' => 'Tools', 'tr' => '5', - 'plugin_id' => 'system_menu_block:menu-tools', + 'plugin_id' => 'menu_menu_block:tools', 'settings' => array('region' => 'sidebar_second', 'machine_name' => 'tools'), 'test_weight' => '-1', ), diff --git a/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php b/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php index ce8b5d1..98cc4fc 100644 --- a/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php +++ b/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php @@ -94,9 +94,8 @@ public function getConfirmText() { public function submit(array $form, array &$form_state) { $form_state['redirect'] = 'admin/structure/menu'; - // System-defined menus may not be deleted - only menus defined by this module. - $system_menus = menu_list_system_menus(); - if (isset($system_menus[$this->entity->id()])) { + // Locked menus may not be deleted. + if ($this->entity->isLocked()) { return; } diff --git a/core/modules/menu/lib/Drupal/menu/MenuFormController.php b/core/modules/menu/lib/Drupal/menu/MenuFormController.php index 582ddde..8266c8a 100644 --- a/core/modules/menu/lib/Drupal/menu/MenuFormController.php +++ b/core/modules/menu/lib/Drupal/menu/MenuFormController.php @@ -73,8 +73,6 @@ public function form(array $form, array &$form_state) { drupal_set_title(t('Edit menu %label', array('%label' => $menu->label())), PASS_THROUGH); } - $system_menus = menu_list_system_menus(); - $form['label'] = array( '#type' => 'textfield', '#title' => t('Title'), @@ -95,7 +93,7 @@ public function form(array $form, array &$form_state) { 'replace' => '-', ), // A menu's machine name cannot be changed. - '#disabled' => !$menu->isNew() || isset($system_menus[$menu->id()]), + '#disabled' => !$menu->isNew() || $menu->isLocked(), ); $form['description'] = array( '#type' => 'textfield', @@ -128,7 +126,7 @@ public function form(array $form, array &$form_state) { } // Add menu links administration form for existing menus. - if (!$menu->isNew() || isset($system_menus[$menu->id()])) { + if (!$menu->isNew() || $menu->isLocked()) { // Form API supports constructing and validating self-contained sections // within forms, but does not allow to handle the form section's submission // equally separated yet. Therefore, we use a $form_state key to point to @@ -214,11 +212,7 @@ public function languageConfigurationSubmit(array &$form, array &$form_state) { */ public function save(array $form, array &$form_state) { $menu = $this->entity; - // @todo Get rid of menu_list_system_menus() https://drupal.org/node/1882552 - // Supposed menu item declared by hook_menu() - // Should be moved to submitOverviewForm() - $system_menus = menu_list_system_menus(); - if (!$menu->isNew() || isset($system_menus[$menu->id()])) { + if (!$menu->isNew() || $menu->isLocked()) { $this->submitOverviewForm($form, $form_state); } diff --git a/core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php b/core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php deleted file mode 100644 index 419617c..0000000 --- a/core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php +++ /dev/null @@ -1,33 +0,0 @@ -getPluginId()); - return menu_tree($menu); - } - -} diff --git a/core/modules/menu/lib/Drupal/menu/Plugin/Derivative/MenuBlock.php b/core/modules/menu/lib/Drupal/menu/Plugin/Derivative/MenuBlock.php deleted file mode 100644 index d3e627c..0000000 --- a/core/modules/menu/lib/Drupal/menu/Plugin/Derivative/MenuBlock.php +++ /dev/null @@ -1,31 +0,0 @@ - $name) { - $this->derivatives[$menu] = $base_plugin_definition; - $this->derivatives[$menu]['admin_label'] = $name; - $this->derivatives[$menu]['cache'] = DRUPAL_NO_CACHE; - } - return $this->derivatives; - } - -} diff --git a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php index 92c4a41..bdd0fbb 100644 --- a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php +++ b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php @@ -407,7 +407,7 @@ function testSystemMenuRename() { public function testBlockContextualLinks() { $this->drupalLogin($this->drupalCreateUser(array('administer menu', 'access contextual links', 'administer blocks'))); $this->addMenuLink(); - $block = $this->drupalPlaceBlock('system_menu_block:menu-tools', array('label' => 'Tools', 'module' => 'system')); + $block = $this->drupalPlaceBlock('menu_menu_block:tools', array('label' => 'Tools', 'module' => 'system')); $this->drupalGet('test-page'); $id = 'block:admin/structure/block/manage:' . $block->id() . ':|menu:admin/structure/menu/manage:tools:'; diff --git a/core/modules/menu/menu.install b/core/modules/menu/menu.install index f1fc64d..36e6302 100644 --- a/core/modules/menu/menu.install +++ b/core/modules/menu/menu.install @@ -80,7 +80,7 @@ function menu_update_8004() { $result = db_query('SELECT * FROM {menu_custom}'); foreach ($result as $menu) { // Save the config object. - Drupal::config('menu.menu.' . $menu->menu_name) + Drupal::config('system.menu.' . $menu->menu_name) ->set('id', $menu->menu_name) ->set('uuid', $uuid->generate()) ->set('label', $menu->title) diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index f564f33..8fb475d 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -141,7 +141,7 @@ function menu_entity_info(&$entity_info) { */ function menu_entity_bundle_info() { $bundles = array(); - $config_names = config_get_storage_names_with_prefix('menu.menu.'); + $config_names = config_get_storage_names_with_prefix('system.menu.'); foreach ($config_names as $config_name) { $config = Drupal::config($config_name); $bundles['menu_link'][$config->get('id')] = array( @@ -382,11 +382,13 @@ function _menu_parents_recurse($tree, $menu_name, $indent, &$options, $exclude, } /** - * Implements hook_block_view_BASE_BLOCK_ID_alter() for 'system_menu_block'. + * Implements hook_block_view_BASE_BLOCK_ID_alter() for 'menu_menu_block'. */ -function menu_block_view_system_menu_block_alter(array &$build, BlockPluginInterface $block) { +function menu_block_view_menu_menu_block_alter(array &$build, BlockPluginInterface $block) { // Add contextual links for system menu blocks. - if (isset($build['content'])) { + $menus = menu_list_system_menus(); + list(, $menu_name) = explode(':', $block->getPluginId()); + if (isset($menus[$menu_name]) && isset($build['content'])) { foreach (element_children($build['content']) as $key) { $build['content']['#contextual_links']['menu'] = array('admin/structure/menu/manage', array($build['content'][$key]['#original_link']['menu_name'])); } diff --git a/core/modules/system/config/schema/system.schema.yml b/core/modules/system/config/schema/system.schema.yml index 46143fd..ad6be6d 100644 --- a/core/modules/system/config/schema/system.schema.yml +++ b/core/modules/system/config/schema/system.schema.yml @@ -308,7 +308,7 @@ system.theme: - type: string label: 'Theme' -menu.menu.*: +system.menu.*: type: mapping label: 'Menu' mapping: diff --git a/core/modules/menu/config/menu.menu.account.yml b/core/modules/system/config/system.menu.account.yml similarity index 91% rename from core/modules/menu/config/menu.menu.account.yml rename to core/modules/system/config/system.menu.account.yml index 0afc9d0..084a601 100644 --- a/core/modules/menu/config/menu.menu.account.yml +++ b/core/modules/system/config/system.menu.account.yml @@ -2,3 +2,4 @@ id: account label: 'User account menu' description: 'Links related to the user account.' langcode: en +locked: 1 diff --git a/core/modules/menu/config/menu.menu.admin.yml b/core/modules/system/config/system.menu.admin.yml similarity index 90% rename from core/modules/menu/config/menu.menu.admin.yml rename to core/modules/system/config/system.menu.admin.yml index d5f89e8..f9a1441 100644 --- a/core/modules/menu/config/menu.menu.admin.yml +++ b/core/modules/system/config/system.menu.admin.yml @@ -2,3 +2,4 @@ id: admin label: Administration description: 'Contains links to administrative tasks.' langcode: en +locked: 1 diff --git a/core/modules/menu/config/menu.menu.footer.yml b/core/modules/system/config/system.menu.footer.yml similarity index 90% rename from core/modules/menu/config/menu.menu.footer.yml rename to core/modules/system/config/system.menu.footer.yml index 7328c6b..5fe060c 100644 --- a/core/modules/menu/config/menu.menu.footer.yml +++ b/core/modules/system/config/system.menu.footer.yml @@ -2,3 +2,4 @@ id: footer label: Footer description: 'Use this for linking to site information.' langcode: en +locked: 1 diff --git a/core/modules/menu/config/menu.menu.main.yml b/core/modules/system/config/system.menu.main.yml similarity index 91% rename from core/modules/menu/config/menu.menu.main.yml rename to core/modules/system/config/system.menu.main.yml index 713bb0b..d4fecc7 100644 --- a/core/modules/menu/config/menu.menu.main.yml +++ b/core/modules/system/config/system.menu.main.yml @@ -2,3 +2,4 @@ id: main label: 'Main navigation' description: 'Use this for linking to the main site sections.' langcode: en +locked: 1 diff --git a/core/modules/menu/config/menu.menu.tools.yml b/core/modules/system/config/system.menu.tools.yml similarity index 92% rename from core/modules/menu/config/menu.menu.tools.yml rename to core/modules/system/config/system.menu.tools.yml index 8bdeec8..c81e9c5 100644 --- a/core/modules/menu/config/menu.menu.tools.yml +++ b/core/modules/system/config/system.menu.tools.yml @@ -2,3 +2,4 @@ id: tools label: Tools description: 'Contains links for site visitors. Some modules add their links here.' langcode: en +locked: 1 diff --git a/core/modules/system/lib/Drupal/system/Entity/Menu.php b/core/modules/system/lib/Drupal/system/Entity/Menu.php index 7b2be7b..9d5fb25 100644 --- a/core/modules/system/lib/Drupal/system/Entity/Menu.php +++ b/core/modules/system/lib/Drupal/system/Entity/Menu.php @@ -23,7 +23,7 @@ * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * "access" = "Drupal\system\MenuAccessController" * }, - * config_prefix = "menu.menu", + * config_prefix = "system.menu", * entity_keys = { * "id" = "id", * "label" = "label", @@ -61,4 +61,32 @@ class Menu extends ConfigEntityBase implements MenuInterface { */ public $description; + /** + * The locked status of this menu. + * + * @var bool + */ + protected $locked = FALSE; + + /** + * {@inheritdoc} + */ + public function getExportProperties() { + $properties = parent::getExportProperties(); + $names = array( + 'locked', + ); + foreach ($names as $name) { + $properties[$name] = $this->get($name); + } + return $properties; + } + + /** + * {@inheritdoc} + */ + public function isLocked() { + return (bool) $this->locked; + } + } diff --git a/core/modules/system/lib/Drupal/system/MenuAccessController.php b/core/modules/system/lib/Drupal/system/MenuAccessController.php index 52b272d..b6e7f7a 100644 --- a/core/modules/system/lib/Drupal/system/MenuAccessController.php +++ b/core/modules/system/lib/Drupal/system/MenuAccessController.php @@ -24,10 +24,8 @@ protected function checkAccess(EntityInterface $entity, $operation, $langcode, A return TRUE; } elseif ($operation == 'delete') { - // System menus could not be deleted. - // @todo Refactor in https://drupal.org/node/1882552 - $system_menus = menu_list_system_menus(); - if (isset($system_menus[$entity->id()])) { + // Locked menus could not be deleted. + if ($entity->isLocked()) { return FALSE; } } diff --git a/core/modules/system/lib/Drupal/system/MenuInterface.php b/core/modules/system/lib/Drupal/system/MenuInterface.php index cd6e73e..d9375c0 100644 --- a/core/modules/system/lib/Drupal/system/MenuInterface.php +++ b/core/modules/system/lib/Drupal/system/MenuInterface.php @@ -14,4 +14,12 @@ */ interface MenuInterface extends ConfigEntityInterface { + /** + * Determines if this menu is locked. + * + * @return bool + * TRUE if the menu is locked, FALSE otherwise. + */ + public function isLocked(); + } diff --git a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php b/core/modules/system/lib/Drupal/system/Plugin/Block/MenuBlock.php similarity index 53% rename from core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php rename to core/modules/system/lib/Drupal/system/Plugin/Block/MenuBlock.php index de823ac..a6ea51a 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php +++ b/core/modules/system/lib/Drupal/system/Plugin/Block/MenuBlock.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\system\Plugin\Block\SystemMenuBlock. + * Contains \Drupal\system\Plugin\Block\MenuBlock. */ namespace Drupal\system\Plugin\Block; @@ -12,16 +12,15 @@ use Drupal\Core\Annotation\Translation; /** - * Provides a 'System Menu' block. + * Provides a generic Menu block. * * @Block( - * id = "system_menu_block", - * admin_label = @Translation("System Menu"), - * category = "menu", - * derivative = "Drupal\system\Plugin\Derivative\SystemMenuBlock" + * id = "menu_menu_block", + * admin_label = @Translation("Menu"), + * derivative = "Drupal\system\Plugin\Derivative\MenuBlock" * ) */ -class SystemMenuBlock extends BlockBase { +class MenuBlock extends BlockBase { /** * Overrides \Drupal\block\BlockBase::access(). @@ -29,16 +28,14 @@ class SystemMenuBlock extends BlockBase { public function access() { // @todo The 'Tools' menu should be available to anonymous users. list( , $derivative) = explode(':', $this->getPluginId()); - return ($GLOBALS['user']->isAuthenticated() || in_array($derivative, array('menu-main', 'menu-tools', 'menu-footer'))); + return ($GLOBALS['user']->isAuthenticated() || in_array($derivative, array('main', 'tools', 'footer'))); } /** * {@inheritdoc} */ public function build() { - list( , $derivative) = explode(':', $this->getPluginId()); - // Derivatives are prefixed with 'menu-'. - $menu = substr($derivative, 5); + list($plugin, $menu) = explode(':', $this->getPluginId()); return menu_tree($menu); } diff --git a/core/modules/system/lib/Drupal/system/Plugin/Derivative/MenuBlock.php b/core/modules/system/lib/Drupal/system/Plugin/Derivative/MenuBlock.php new file mode 100644 index 0000000..c005019 --- /dev/null +++ b/core/modules/system/lib/Drupal/system/Plugin/Derivative/MenuBlock.php @@ -0,0 +1,60 @@ +menuStorage = $menu_storage; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, $base_plugin_id) { + return new static( + $container->get('entity.manager')->getStorageController('menu') + ); + } + + /** + * {@inheritdoc} + */ + public function getDerivativeDefinitions(array $base_plugin_definition) { + foreach ($this->menuStorage->loadMultiple() as $menu => $entity) { + $this->derivatives[$menu] = $base_plugin_definition; + $this->derivatives[$menu]['admin_label'] = $entity->label(); + $this->derivatives[$menu]['cache'] = DRUPAL_NO_CACHE; + } + return $this->derivatives; + } + +} diff --git a/core/modules/system/lib/Drupal/system/Plugin/Derivative/SystemMenuBlock.php b/core/modules/system/lib/Drupal/system/Plugin/Derivative/SystemMenuBlock.php deleted file mode 100644 index c912400..0000000 --- a/core/modules/system/lib/Drupal/system/Plugin/Derivative/SystemMenuBlock.php +++ /dev/null @@ -1,36 +0,0 @@ - $name) { - // The block deltas need to be prefixed with 'menu-', since the 'main' - // menu would otherwise clash with the 'main' page content block. - $menu_key = 'menu-' . $menu; - $this->derivatives[$menu_key] = $base_plugin_definition; - // It is possible that users changed the menu label. Fall back on the - // built-in menu label if the entity was not found. - $entity = entity_load('menu', $menu); - $this->derivatives[$menu_key]['admin_label'] = !empty($entity) ? $entity->label() : $name; - $this->derivatives[$menu_key]['cache'] = DRUPAL_NO_CACHE; - } - return parent::getDerivativeDefinitions($base_plugin_definition); - } -} diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php index 7d1814e..3e1259f 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php @@ -48,9 +48,9 @@ function setUp() { 'machine_name' => 'system_menu_tools', 'region' => 'content', ); - $this->drupalPlaceBlock('system_menu_block:menu-tools', $settings); + $this->drupalPlaceBlock('menu_menu_block:tools', $settings); $settings['theme'] = \Drupal::config('system.theme')->get('admin'); - $this->drupalPlaceBlock('system_menu_block:menu-tools', $settings); + $this->drupalPlaceBlock('menu_menu_block:tools', $settings); } /** diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php index 31ef055..392cbdb 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php @@ -65,7 +65,7 @@ function setUp() { ->set('admin', $this->admin_theme) ->save(); theme_disable(array($this->alternate_theme)); - $this->drupalPlaceBlock('system_menu_block:menu-tools'); + $this->drupalPlaceBlock('menu_menu_block:tools'); } /** diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/TrailTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/TrailTest.php index fbd3e34..715ad69 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Menu/TrailTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Menu/TrailTest.php @@ -35,8 +35,8 @@ function setUp() { // This test puts menu links in the Tools and Administration menus and then // tests for their presence on the page. - $this->drupalPlaceBlock('system_menu_block:menu-tools'); - $this->drupalPlaceBlock('system_menu_block:menu-admin'); + $this->drupalPlaceBlock('menu_menu_block:tools'); + $this->drupalPlaceBlock('menu_menu_block:admin'); } /** diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 358d332..4436a5e 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -2283,17 +2283,23 @@ function system_user_timezone(&$form, &$form_state) { */ function system_preprocess_block(&$variables) { // Derive the base plugin ID. - list($plugin_id) = explode(':', $variables['plugin_id'] . ':'); + list($plugin_id, $derivative) = explode(':', $variables['plugin_id'] . ':'); switch ($plugin_id) { case 'system_powered_by_block': $variables['attributes']['role'] = 'complementary'; break; + case 'system_help_block': $variables['attributes']['role'] = 'complementary'; break; - case 'system_menu_block': - $variables['attributes']['role'] = 'navigation'; - $variables['attributes']['class'][] = 'block-menu'; + + case 'menu_menu_block': + $menus = menu_list_system_menus(); + if (isset($menus[$derivative])) { + $variables['attributes']['role'] = 'navigation'; + $variables['attributes']['class'][] = 'block-menu'; + } + break; } } diff --git a/core/profiles/minimal/config/block.block.stark.admin.yml b/core/profiles/minimal/config/block.block.stark.admin.yml index d67096f..c623a53 100644 --- a/core/profiles/minimal/config/block.block.stark.admin.yml +++ b/core/profiles/minimal/config/block.block.stark.admin.yml @@ -3,7 +3,7 @@ weight: '1' status: '1' langcode: en region: sidebar_first -plugin: 'system_menu_block:menu-admin' +plugin: 'menu_menu_block:admin' settings: label: Administration module: system diff --git a/core/profiles/minimal/config/block.block.stark.tools.yml b/core/profiles/minimal/config/block.block.stark.tools.yml index 6901d44..4159142 100644 --- a/core/profiles/minimal/config/block.block.stark.tools.yml +++ b/core/profiles/minimal/config/block.block.stark.tools.yml @@ -3,7 +3,7 @@ weight: '0' status: '1' langcode: en region: sidebar_first -plugin: 'system_menu_block:menu-tools' +plugin: 'menu_menu_block:tools' settings: label: Tools module: system diff --git a/core/profiles/standard/config/block.block.bartik.footer.yml b/core/profiles/standard/config/block.block.bartik.footer.yml index 65c77f0..a8519eb 100644 --- a/core/profiles/standard/config/block.block.bartik.footer.yml +++ b/core/profiles/standard/config/block.block.bartik.footer.yml @@ -3,7 +3,7 @@ weight: '0' status: '1' langcode: en region: footer -plugin: 'system_menu_block:menu-footer' +plugin: 'menu_menu_block:footer' settings: label: 'Footer menu' module: system diff --git a/core/profiles/standard/config/block.block.bartik.tools.yml b/core/profiles/standard/config/block.block.bartik.tools.yml index 633e299..496e87a 100644 --- a/core/profiles/standard/config/block.block.bartik.tools.yml +++ b/core/profiles/standard/config/block.block.bartik.tools.yml @@ -3,7 +3,7 @@ weight: '0' status: '1' langcode: en region: sidebar_first -plugin: 'system_menu_block:menu-tools' +plugin: 'menu_menu_block:tools' settings: label: Tools module: system diff --git a/core/profiles/standard/lib/Drupal/standard/Tests/StandardTest.php b/core/profiles/standard/lib/Drupal/standard/Tests/StandardTest.php index fc21631..b17704a 100644 --- a/core/profiles/standard/lib/Drupal/standard/Tests/StandardTest.php +++ b/core/profiles/standard/lib/Drupal/standard/Tests/StandardTest.php @@ -37,7 +37,7 @@ function testStandard() { $admin = $this->drupalCreateUser(array('administer blocks')); $this->drupalLogin($admin); // Configure the block. - $this->drupalGet('admin/structure/block/add/system_menu_block:menu-main/bartik'); + $this->drupalGet('admin/structure/block/add/menu_menu_block:main/bartik'); $this->drupalPost(NULL, array( 'region' => 'sidebar_first', 'machine_name' => 'main_navigation',