Issue #2310371 by dawehner: Replace Views::getApplicableViews('uses_hook_menu') with Views::getApplicableViews('uses_menu_links').
parent
2ace26881d
commit
a115d7cc03
|
@ -25,7 +25,7 @@ use Drupal\views\Plugin\views\display\DisplayPluginBase;
|
|||
* 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 @@ class ViewsLocalTask extends DeriverBase implements ContainerDeriverInterface {
|
|||
* @endcode
|
||||
*/
|
||||
protected function getApplicableMenuViews() {
|
||||
return Views::getApplicableViews('uses_hook_menu');
|
||||
return Views::getApplicableViews('uses_menu_links');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,9 +34,7 @@ class ViewsMenuLink implements DeriverInterface {
|
|||
*/
|
||||
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 @@ namespace Drupal\views\Plugin\views\display;
|
|||
* 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 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|||
* 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 @@ class Views {
|
|||
* 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 @@ class ViewListBuilderTest extends UnitTestCase {
|
|||
array(
|
||||
'id' => 'page',
|
||||
'title' => 'Page',
|
||||
'uses_hook_menu' => TRUE,
|
||||
'uses_menu_links' => TRUE,
|
||||
'uses_route' => TRUE,
|
||||
'contextual_links_locations' => array('page'),
|
||||
'theme' => 'views_view',
|
||||
|
|
Loading…
Reference in New Issue