diff --git a/core/modules/entity_reference/src/Plugin/views/display/EntityReference.php b/core/modules/entity_reference/src/Plugin/views/display/EntityReference.php index b75983162c45683ca2e0caac7ce19142aa2b63c1..beeb095a24b305c962fd7c2bd9eb6b5972e06472 100644 --- a/core/modules/entity_reference/src/Plugin/views/display/EntityReference.php +++ b/core/modules/entity_reference/src/Plugin/views/display/EntityReference.php @@ -25,7 +25,7 @@ * help = @Translation("Selects referenceable entities for an entity reference field."), * theme = "views_view", * register_theme = FALSE, - * uses_hook_menu = FALSE, + * uses_menu_links = FALSE, * entity_reference_display = TRUE * ) */ diff --git a/core/modules/views/src/Annotation/ViewsDisplay.php b/core/modules/views/src/Annotation/ViewsDisplay.php index 2efecd46e6a864141787b731e9065e663c3f79ca..76f402dc8731d7766d4d22ccd4e33f58e64f682b 100644 --- a/core/modules/views/src/Annotation/ViewsDisplay.php +++ b/core/modules/views/src/Annotation/ViewsDisplay.php @@ -71,7 +71,7 @@ class ViewsDisplay extends ViewsPluginAnnotationBase { * * @var bool */ - public $uses_hook_menu; + public $uses_menu_links; /** * Does the display plugin registers routes to the route. diff --git a/core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php b/core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php index f1ae20dda6bc977b0fab860c7160bb5b460ef578..ef531b4e207a6259a3ef011ff5cd19dbeaa16933 100644 --- a/core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php +++ b/core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php @@ -150,7 +150,7 @@ public function alterLocalTasks(&$local_tasks) { * @endcode */ protected function getApplicableMenuViews() { - return Views::getApplicableViews('uses_hook_menu'); + return Views::getApplicableViews('uses_menu_links'); } } diff --git a/core/modules/views/src/Plugin/Derivative/ViewsMenuLink.php b/core/modules/views/src/Plugin/Derivative/ViewsMenuLink.php index e83af2be214e6cd9ff85aee33e51b2c58bc57d49..e4e7bc0145da11d4bb71f909653767592433ffcf 100644 --- a/core/modules/views/src/Plugin/Derivative/ViewsMenuLink.php +++ b/core/modules/views/src/Plugin/Derivative/ViewsMenuLink.php @@ -34,9 +34,7 @@ public function getDerivativeDefinition($derivative_id, $base_plugin_definition) */ public function getDerivativeDefinitions($base_plugin_definition) { $links = array(); - // @todo Replace uses_hook_menu with an annotation. - // https://www.drupal.org/node/2310371 - $views = Views::getApplicableViews('uses_hook_menu'); + $views = Views::getApplicableViews('uses_menu_links'); foreach ($views as $data) { /** @var \Drupal\views\ViewExecutable $view */ list($view, $display_id) = $data; diff --git a/core/modules/views/src/Plugin/views/display/Embed.php b/core/modules/views/src/Plugin/views/display/Embed.php index c1cd149ef53936d958c6a84b677c6b821dd87430..816992181a1e76290c045adef92e9888b0fbe779 100644 --- a/core/modules/views/src/Plugin/views/display/Embed.php +++ b/core/modules/views/src/Plugin/views/display/Embed.php @@ -20,7 +20,7 @@ * title = @Translation("Embed"), * help = @Translation("Provide a display which can be embedded using the views api."), * theme = "views_view", - * uses_hook_menu = FALSE + * uses_menu_links = FALSE * ) */ class Embed extends DisplayPluginBase { diff --git a/core/modules/views/src/Plugin/views/display/Page.php b/core/modules/views/src/Plugin/views/display/Page.php index ca099a2f293c01749f29a54a6c54feab2997a5f7..0ad1c8719b1a46ab813f5a72d725d2409b9a756f 100644 --- a/core/modules/views/src/Plugin/views/display/Page.php +++ b/core/modules/views/src/Plugin/views/display/Page.php @@ -21,7 +21,7 @@ * id = "page", * title = @Translation("Page"), * help = @Translation("Display the view as a page, with a URL and menu links."), - * uses_hook_menu = TRUE, + * uses_menu_links = TRUE, * uses_route = TRUE, * contextual_links_locations = {"page"}, * theme = "views_view", diff --git a/core/modules/views/src/Views.php b/core/modules/views/src/Views.php index 61f053c1a55c0723c0f031a8235759fca86d6801..525177fc12f31bf11195ff38e84d65e7492a4088 100644 --- a/core/modules/views/src/Views.php +++ b/core/modules/views/src/Views.php @@ -198,7 +198,7 @@ public static function getEnabledDisplayExtenders() { * setting in their display's plugin settings. * * @param string $type - * A flag from the display plugin definitions (e.g, 'uses_hook_menu'). + * A flag from the display plugin definitions (e.g, 'uses_menu_links'). * * @return array * A list of arrays containing the $view and $display_id. diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 28db666f4ed880497af41f77eaf4c268e034e77c..d1979df5afbf7be28e650f7747ef7347e9acb82b 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -661,7 +661,7 @@ function views_get_enabled_display_extenders() { * setting in their display's plugin settings. * * @param string $type - * A flag from the display plugin definitions (e.g, 'uses_hook_menu'). + * A flag from the display plugin definitions (e.g, 'uses_menu_links'). * * @return array * A list of arrays containing the $view and $display_id. diff --git a/core/modules/views_ui/tests/src/ViewListBuilderTest.php b/core/modules/views_ui/tests/src/ViewListBuilderTest.php index 637fe9f2fcd4ac7811d37c85b2000306d6d06d8f..14b5f330a1897be3be891ae94e2cc9fc2a906cea 100644 --- a/core/modules/views_ui/tests/src/ViewListBuilderTest.php +++ b/core/modules/views_ui/tests/src/ViewListBuilderTest.php @@ -56,7 +56,7 @@ public function testBuildRowEntityList() { array( 'id' => 'page', 'title' => 'Page', - 'uses_hook_menu' => TRUE, + 'uses_menu_links' => TRUE, 'uses_route' => TRUE, 'contextual_links_locations' => array('page'), 'theme' => 'views_view',