Commit a115d7cc authored by webchick's avatar webchick

Issue #2310371 by dawehner: Replace...

Issue #2310371 by dawehner: Replace Views::getApplicableViews('uses_hook_menu') with Views::getApplicableViews('uses_menu_links').
parent 2ace2688
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
* help = @Translation("Selects referenceable entities for an entity reference field."), * help = @Translation("Selects referenceable entities for an entity reference field."),
* theme = "views_view", * theme = "views_view",
* register_theme = FALSE, * register_theme = FALSE,
* uses_hook_menu = FALSE, * uses_menu_links = FALSE,
* entity_reference_display = TRUE * entity_reference_display = TRUE
* ) * )
*/ */
......
...@@ -71,7 +71,7 @@ class ViewsDisplay extends ViewsPluginAnnotationBase { ...@@ -71,7 +71,7 @@ class ViewsDisplay extends ViewsPluginAnnotationBase {
* *
* @var bool * @var bool
*/ */
public $uses_hook_menu; public $uses_menu_links;
/** /**
* Does the display plugin registers routes to the route. * Does the display plugin registers routes to the route.
......
...@@ -150,7 +150,7 @@ public function alterLocalTasks(&$local_tasks) { ...@@ -150,7 +150,7 @@ public function alterLocalTasks(&$local_tasks) {
* @endcode * @endcode
*/ */
protected function getApplicableMenuViews() { protected function getApplicableMenuViews() {
return Views::getApplicableViews('uses_hook_menu'); return Views::getApplicableViews('uses_menu_links');
} }
} }
...@@ -34,9 +34,7 @@ public function getDerivativeDefinition($derivative_id, $base_plugin_definition) ...@@ -34,9 +34,7 @@ public function getDerivativeDefinition($derivative_id, $base_plugin_definition)
*/ */
public function getDerivativeDefinitions($base_plugin_definition) { public function getDerivativeDefinitions($base_plugin_definition) {
$links = array(); $links = array();
// @todo Replace uses_hook_menu with an annotation. $views = Views::getApplicableViews('uses_menu_links');
// https://www.drupal.org/node/2310371
$views = Views::getApplicableViews('uses_hook_menu');
foreach ($views as $data) { foreach ($views as $data) {
/** @var \Drupal\views\ViewExecutable $view */ /** @var \Drupal\views\ViewExecutable $view */
list($view, $display_id) = $data; list($view, $display_id) = $data;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* title = @Translation("Embed"), * title = @Translation("Embed"),
* help = @Translation("Provide a display which can be embedded using the views api."), * help = @Translation("Provide a display which can be embedded using the views api."),
* theme = "views_view", * theme = "views_view",
* uses_hook_menu = FALSE * uses_menu_links = FALSE
* ) * )
*/ */
class Embed extends DisplayPluginBase { class Embed extends DisplayPluginBase {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* id = "page", * id = "page",
* title = @Translation("Page"), * title = @Translation("Page"),
* help = @Translation("Display the view as a page, with a URL and menu links."), * 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, * uses_route = TRUE,
* contextual_links_locations = {"page"}, * contextual_links_locations = {"page"},
* theme = "views_view", * theme = "views_view",
......
...@@ -198,7 +198,7 @@ public static function getEnabledDisplayExtenders() { ...@@ -198,7 +198,7 @@ public static function getEnabledDisplayExtenders() {
* setting in their display's plugin settings. * setting in their display's plugin settings.
* *
* @param string $type * @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 * @return array
* A list of arrays containing the $view and $display_id. * A list of arrays containing the $view and $display_id.
......
...@@ -661,7 +661,7 @@ function views_get_enabled_display_extenders() { ...@@ -661,7 +661,7 @@ function views_get_enabled_display_extenders() {
* setting in their display's plugin settings. * setting in their display's plugin settings.
* *
* @param string $type * @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 * @return array
* A list of arrays containing the $view and $display_id. * A list of arrays containing the $view and $display_id.
......
...@@ -56,7 +56,7 @@ public function testBuildRowEntityList() { ...@@ -56,7 +56,7 @@ public function testBuildRowEntityList() {
array( array(
'id' => 'page', 'id' => 'page',
'title' => 'Page', 'title' => 'Page',
'uses_hook_menu' => TRUE, 'uses_menu_links' => TRUE,
'uses_route' => TRUE, 'uses_route' => TRUE,
'contextual_links_locations' => array('page'), 'contextual_links_locations' => array('page'),
'theme' => 'views_view', 'theme' => 'views_view',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment