function Editor::__construct
Same name in this branch
- 11.x core/modules/editor/src/Attribute/Editor.php \Drupal\editor\Attribute\Editor::__construct()
Same name in other branches
- 9 core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor::__construct()
- 9 core/modules/editor/src/Plugin/InPlaceEditor/Editor.php \Drupal\editor\Plugin\InPlaceEditor\Editor::__construct()
- 8.9.x core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor::__construct()
- 10 core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor::__construct()
- 10 core/modules/editor/src/Attribute/Editor.php \Drupal\editor\Attribute\Editor::__construct()
Overrides ConfigEntityBase::__construct
File
-
core/
modules/ editor/ src/ Entity/ Editor.php, line 103
Class
- Editor
- Defines the configured text editor entity.
Namespace
Drupal\editor\EntityCode
public function __construct(array $values, $entity_type) {
parent::__construct($values, $entity_type);
try {
$plugin = $this->editorPluginManager()
->createInstance($this->editor);
$this->settings += $plugin->getDefaultSettings();
} catch (PluginNotFoundException) {
// When a Text Editor plugin has gone missing, still allow the Editor
// config entity to be constructed. The only difference is that default
// settings are not added.
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.