diff --git a/core/modules/settings_tray/settings_tray.links.contextual.yml b/core/modules/settings_tray/settings_tray.links.contextual.yml index 5534ab2..c62fa98 100644 --- a/core/modules/settings_tray/settings_tray.links.contextual.yml +++ b/core/modules/settings_tray/settings_tray.links.contextual.yml @@ -1,6 +1,6 @@ settings_tray.block_configure: title: 'Quick edit' - route_name: 'entity.block.off_canvas_form' + route_name: 'entity.block.settings_tray_form' group: 'block' options: attributes: diff --git a/core/modules/settings_tray/settings_tray.module b/core/modules/settings_tray/settings_tray.module index 7017439..b54bec9 100644 --- a/core/modules/settings_tray/settings_tray.module +++ b/core/modules/settings_tray/settings_tray.module @@ -7,7 +7,7 @@ use Drupal\Core\Asset\AttachedAssetsInterface; use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\settings_tray\Block\BlockEntityOffCanvasForm; +use Drupal\settings_tray\Block\BlockEntitySettingTrayForm; use Drupal\settings_tray\Form\SystemBrandingOffCanvasForm; use Drupal\settings_tray\Form\SystemMenuOffCanvasForm; @@ -86,8 +86,8 @@ function settings_tray_theme() { function settings_tray_entity_type_build(array &$entity_types) { /* @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */ $entity_types['block'] - ->setFormClass('off_canvas', BlockEntityOffCanvasForm::class) - ->setLinkTemplate('off_canvas-form', '/admin/structure/block/manage/{block}/off-canvas'); + ->setFormClass('settings_tray', BlockEntitySettingTrayForm::class) + ->setLinkTemplate('settings_tray-form', '/admin/structure/block/manage/{block}/settings-tray'); } /** diff --git a/core/modules/settings_tray/settings_tray.routing.yml b/core/modules/settings_tray/settings_tray.routing.yml index 01109e4..d1040b3 100644 --- a/core/modules/settings_tray/settings_tray.routing.yml +++ b/core/modules/settings_tray/settings_tray.routing.yml @@ -1,8 +1,8 @@ -entity.block.off_canvas_form: - path: '/admin/structure/block/manage/{block}/off-canvas' +entity.block.settings_tray_form: + path: '/admin/structure/block/manage/{block}/settings-tray' defaults: - _entity_form: 'block.off_canvas' - _title_callback: '\Drupal\settings_tray\Block\BlockEntityOffCanvasForm::title' + _entity_form: 'block.settings_tray' + _title_callback: '\Drupal\settings_tray\Block\BlockEntitySettingTrayForm::title' requirements: _permission: 'administer blocks' _access_block_plugin_has_settings_tray_form: 'TRUE' diff --git a/core/modules/settings_tray/src/Block/BlockEntityOffCanvasForm.php b/core/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php similarity index 99% rename from core/modules/settings_tray/src/Block/BlockEntityOffCanvasForm.php rename to core/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php index 2c6f80d..fd44b0c 100644 --- a/core/modules/settings_tray/src/Block/BlockEntityOffCanvasForm.php +++ b/core/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php @@ -21,7 +21,7 @@ * * @internal */ -class BlockEntityOffCanvasForm extends BlockForm { +class BlockEntitySettingTrayForm extends BlockForm { /** * Provides a title callback to get the block's admin label. diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php index d2881eb..e63350b 100644 --- a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php +++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php @@ -78,7 +78,7 @@ public function testBlocks($block_plugin, $new_page_text, $element_selector, $la $link = $page->find('css', "$block_selector .contextual-links li a"); $this->assertEquals('Quick edit', $link->getText(), "'Quick edit' is the first contextual link for the block."); - $this->assertContains("/admin/structure/block/manage/$block_id/off-canvas?destination=user/2", $link->getAttribute('href')); + $this->assertContains("/admin/structure/block/manage/$block_id/settings-tray?destination=user/2", $link->getAttribute('href')); if (isset($toolbar_item)) { // Check that you can open a toolbar tray and it will be closed after @@ -507,7 +507,7 @@ public function testCustomBlockLinks() { $href = array_search('Quick edit', $link_labels); $this->assertEquals('', $href); $href = array_search('Quick edit settings', $link_labels); - $this->assertTrue(strstr($href, '/admin/structure/block/manage/custom/off-canvas?destination=user/2') !== FALSE); + $this->assertTrue(strstr($href, '/admin/structure/block/manage/custom/settings-tray?destination=user/2') !== FALSE); } /**