ModerationStateTransition::calculateDependencies

public 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

core/modules/content_moderation/src/Entity/ModerationStateTransition.php, line 81

Class

ModerationStateTransition
Defines the Moderation state transition entity.

Namespace

Drupal\content_moderation\Entity

Code

public function calculateDependencies() {
  parent::calculateDependencies();

  if ($this->stateFrom) {
    $this->addDependency('config', ModerationState::load($this->stateFrom)->getConfigDependencyName());
  }
  if ($this->stateTo) {
    $this->addDependency('config', ModerationState::load($this->stateTo)->getConfigDependencyName());
  }
  return $this;
}
doc_Drupal
2016-10-29 09:28:54
Comments
Leave a Comment

Please login to continue.