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 @@
* 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
* )
*/
......
......@@ -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.
......
......@@ -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');
}
}
......@@ -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;
......
......@@ -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 {
......
......@@ -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",
......
......@@ -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.
......
......@@ -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.
......
......@@ -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',
......
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