function ViewsLocalTask::getApplicableMenuViews

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php \Drupal\views\Plugin\Derivative\ViewsLocalTask::getApplicableMenuViews()
  2. 10 core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php \Drupal\views\Plugin\Derivative\ViewsLocalTask::getApplicableMenuViews()
  3. 11.x core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php \Drupal\views\Plugin\Derivative\ViewsLocalTask::getApplicableMenuViews()

Return a list of all views and display IDs that have a menu entry.

array(
    array(
        $view,
        $display_id,
    ),
    array(
        $view,
        $display_id,
    ),
);

Return value

array A list of arrays containing the $view and $display_id.

2 calls to ViewsLocalTask::getApplicableMenuViews()
ViewsLocalTask::alterLocalTasks in core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php
Alters base_route and parent_id into the views local tasks.
ViewsLocalTask::getDerivativeDefinitions in core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php
Gets the definition of all derivatives of a base plugin.
1 method overrides ViewsLocalTask::getApplicableMenuViews()
TestViewsLocalTask::getApplicableMenuViews in core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php
Return a list of all views and display IDs that have a menu entry.

File

core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php, line 162

Class

ViewsLocalTask
Provides local task definitions for all views configured as local tasks.

Namespace

Drupal\views\Plugin\Derivative

Code

protected function getApplicableMenuViews() {
    return Views::getApplicableViews('uses_menu_links');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.