public function ModerationStateTransition::calculateDependencies in Workbench Moderation 8.2
Same name and namespace in other branches
- 8 src/Entity/ModerationStateTransition.php \Drupal\workbench_moderation\Entity\ModerationStateTransition::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/ ModerationStateTransition.php, line 84
Class
- ModerationStateTransition
- Defines the Moderation state transition entity.
Namespace
Drupal\workbench_moderation\EntityCode
public function calculateDependencies() {
parent::calculateDependencies();
$prefix = $this
->getModerationStateConfigPrefix() . '.';
if ($this->stateFrom) {
$this
->addDependency('config', $prefix . $this->stateFrom);
}
if ($this->stateTo) {
$this
->addDependency('config', $prefix . $this->stateTo);
}
return $this;
}