function Editor::__construct

Same name and namespace in other branches
  1. 9 core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor::__construct()
  2. 9 core/modules/editor/src/Plugin/InPlaceEditor/Editor.php \Drupal\editor\Plugin\InPlaceEditor\Editor::__construct()
  3. 10 core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor::__construct()
  4. 11.x core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor::__construct()
  5. 11.x core/modules/editor/src/Attribute/Editor.php \Drupal\editor\Attribute\Editor::__construct()

Overrides ConfigEntityBase::__construct

File

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

Class

Editor
Defines the configured text editor entity.

Namespace

Drupal\editor\Entity

Code

public function __construct(array $values, $entity_type) {
    parent::__construct($values, $entity_type);
    $plugin = $this->editorPluginManager()
        ->createInstance($this->editor);
    $this->settings += $plugin->getDefaultSettings();
}

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