Issue #2310371 by dawehner: Replace Views::getApplicableViews('uses_hook_menu') with Views::getApplicableViews('uses_menu_links').

8.0.x
webchick 2014-08-04 09:27:46 -07:00
parent 2ace26881d
commit a115d7cc03
9 changed files with 9 additions and 11 deletions

View File

@ -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
* )
*/

View File

@ -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.

View File

@ -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');
}
}

View File

@ -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;

View File

@ -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 {

View File

@ -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",

View File

@ -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.

View File

@ -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.

View File

@ -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',