function Editor::calculateDependencies

Same name and namespace in other branches
  1. 9 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 107

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.