You are here

public function Block::calculateDependencies in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block::calculateDependencies()
  2. 9 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block::calculateDependencies()

Calculates dependencies and stores them in the dependency property.

Return value

$this

Overrides ConfigEntityBase::calculateDependencies

See also

\Drupal\Core\Config\Entity\ConfigDependencyManager

File

core/modules/block/src/Entity/Block.php, line 236

Class

Block
Defines a Block configuration entity class.

Namespace

Drupal\block\Entity

Code

public function calculateDependencies() {
  parent::calculateDependencies();
  $this
    ->addDependency('theme', $this->theme);
  return $this;
}