You are here

public function Translator::calculateDependencies in Translation Management Tool 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/Translator.php, line 505

Class

Translator
Entity class for the tmgmt_translator entity.

Namespace

Drupal\tmgmt\Entity

Code

public function calculateDependencies() {
  parent::calculateDependencies();
  if ($this
    ->getPlugin()) {
    $this
      ->addDependency('module', $this
      ->getPlugin()
      ->getPluginDefinition()['provider']);
  }
  return $this;
}