You are here

public function PageVariant::calculateDependencies in Page Manager 8.4

Same name and namespace in other branches
  1. 8 src/Entity/PageVariant.php \Drupal\page_manager\Entity\PageVariant::calculateDependencies()

Calculates dependencies and stores them in the dependency property.

Return value

$this

Overrides ConfigEntityBase::calculateDependencies

See also

\Drupal\Core\Config\Entity\ConfigDependencyManager

File

src/Entity/PageVariant.php, line 188

Class

PageVariant
Defines the page variant entity.

Namespace

Drupal\page_manager\Entity

Code

public function calculateDependencies() {
  parent::calculateDependencies();
  $this
    ->addDependency('config', $this
    ->getPage()
    ->getConfigDependencyName());
  foreach ($this
    ->getSelectionConditions() as $instance) {
    $this
      ->calculatePluginDependencies($instance);
  }
  return $this
    ->getDependencies();
}