public function SimpleBlock::calculateDependencies in Simple Block 8
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/ SimpleBlock.php, line 81
Class
- SimpleBlock
- Defines the block config configuration entity.
Namespace
Drupal\simple_block\EntityCode
public function calculateDependencies() {
parent::calculateDependencies();
if (!empty($format_id = $this
->getContent()['format'])) {
if ($format = FilterFormat::load($format_id)) {
$this
->addDependency($format
->getConfigDependencyKey(), $format
->getConfigDependencyName());
}
}
return $this;
}