diff --git a/core/modules/search/src/Plugin/SearchInterface.php b/core/modules/search/src/Plugin/SearchInterface.php index 66585cddf3..3dee690ff3 100644 --- a/core/modules/search/src/Plugin/SearchInterface.php +++ b/core/modules/search/src/Plugin/SearchInterface.php @@ -154,6 +154,6 @@ public function buildSearchUrlQuery(FormStateInterface $form_state); * * @see \Drupal\search\Annotation\SearchPlugin::$use_admin_theme */ - public function needsAdminTheme(); + public function usesAdminTheme(); } diff --git a/core/modules/search/src/Plugin/SearchPluginBase.php b/core/modules/search/src/Plugin/SearchPluginBase.php index 941a02954c..4c7d93335e 100644 --- a/core/modules/search/src/Plugin/SearchPluginBase.php +++ b/core/modules/search/src/Plugin/SearchPluginBase.php @@ -165,7 +165,7 @@ public function getHelp() { /** * {@inheritdoc} */ - public function needsAdminTheme() { + public function usesAdminTheme() { return $this->pluginDefinition['use_admin_theme']; } diff --git a/core/modules/search/src/Routing/SearchPageRoutes.php b/core/modules/search/src/Routing/SearchPageRoutes.php index 64910c2476..30fd1af18f 100644 --- a/core/modules/search/src/Routing/SearchPageRoutes.php +++ b/core/modules/search/src/Routing/SearchPageRoutes.php @@ -110,7 +110,7 @@ public function routes() { ], ] ); - if ($entity->getPlugin()->needsAdminTheme()) { + if ($entity->getPlugin()->usesAdminTheme()) { $routes["search.view_$entity_id"]->setOption('_admin_route', TRUE); $routes["search.help_$entity_id"]->setOption('_admin_route', TRUE); } diff --git a/core/modules/search/tests/src/Functional/SearchAdminThemeTest.php b/core/modules/search/tests/src/Functional/SearchAdminThemeTest.php index 91ce3d0bd7..4bf60f1d6b 100644 --- a/core/modules/search/tests/src/Functional/SearchAdminThemeTest.php +++ b/core/modules/search/tests/src/Functional/SearchAdminThemeTest.php @@ -80,7 +80,7 @@ public function testSearchUsingAdminTheme() { // @todo Test label in https://www.drupal.org/node/3086795 $path_help = $path . '/help'; $session->linkByHrefExists($path_help); - $this->assertSame($use_admin_theme, $plugin->needsAdminTheme()); + $this->assertSame($use_admin_theme, $plugin->usesAdminTheme()); $this->assertAdminTheme($use_admin_theme); $this->drupalGet($path_help); $this->assertAdminTheme($use_admin_theme);