function Page::calculateDependencies

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

Overrides DisplayPluginBase::calculateDependencies

File

core/modules/views/src/Plugin/views/display/Page.php, line 550

Class

Page
The plugin that handles a full page.

Namespace

Drupal\views\Plugin\views\display

Code

public function calculateDependencies() {
    $dependencies = parent::calculateDependencies();
    $menu = $this->getOption('menu');
    if ($menu['type'] === 'normal' && ($menu_entity = $this->menuStorage
        ->load($menu['menu_name']))) {
        $dependencies[$menu_entity->getConfigDependencyKey()][] = $menu_entity->getConfigDependencyName();
    }
    return $dependencies;
}

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