function Editor::calculateDependencies

Same name in other branches
  1. 8.9.x core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor::calculateDependencies()
  2. 10 core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor::calculateDependencies()
  3. 11.x core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor::calculateDependencies()

Overrides ConfigEntityBase::calculateDependencies

File

core/modules/editor/src/Entity/Editor.php, line 114

Class

Editor
Defines the configured text editor entity.

Namespace

Drupal\editor\Entity

Code

public function calculateDependencies() {
    parent::calculateDependencies();
    // Create a dependency on the associated FilterFormat.
    $this->addDependency('config', $this->getFilterFormat()
        ->getConfigDependencyName());
    // @todo use EntityWithPluginCollectionInterface so configuration between
    //   config entity and dependency on provider is managed automatically.
    $definition = $this->editorPluginManager()
        ->createInstance($this->editor)
        ->getPluginDefinition();
    $this->addDependency('module', $definition['provider']);
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.