Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. View.php

function View::calculateDependencies

Same name in this branch
  1. 11.1.x core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::calculateDependencies()

Overrides HandlerBase::calculateDependencies

File

core/modules/views/src/Plugin/views/area/View.php, line 152

Class

View
Views area handlers. Insert a view inside of an area.

Namespace

Drupal\views\Plugin\views\area

Code

public function calculateDependencies() {
    $dependencies = parent::calculateDependencies();
    [
        $view_id,
    ] = explode(':', $this->options['view_to_insert'], 2);
    // Don't call the current view, as it would result into an infinite recursion.
    if ($view_id && $this->view->storage
        ->id() != $view_id) {
        $view = $this->viewStorage
            ->load($view_id);
        $dependencies[$view->getConfigDependencyKey()][] = $view->getConfigDependencyName();
    }
    return $dependencies;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal