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/Plugin/views/area/View.php \Drupal\views\Plugin\views\area\View::calculateDependencies()

Overrides ConfigEntityBase::calculateDependencies

1 call to View::calculateDependencies()
View::onDependencyRemoval in core/modules/views/src/Entity/View.php
Informs the entity that entities it depends on will be deleted.

File

core/modules/views/src/Entity/View.php, line 267

Class

View
Defines a View configuration entity class.

Namespace

Drupal\views\Entity

Code

public function calculateDependencies() {
    parent::calculateDependencies();
    // Ensure that the view is dependant on the module that implements the view.
    $this->addDependency('module', $this->module);
    $executable = $this->getExecutable();
    $executable->initDisplay();
    $executable->initStyle();
    foreach ($executable->displayHandlers as $display) {
        // Calculate the dependencies each display has.
        $this->calculatePluginDependencies($display);
    }
    return $this;
}

API Navigation

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