You are here

public function Editor::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor::__construct()
  2. 10 core/modules/editor/src/Entity/Editor.php \Drupal\editor\Entity\Editor::__construct()

Constructs an Entity object.

Parameters

array $values: An array of values to set, keyed by property name. If the entity type has bundles, the bundle key has to be specified.

string $entity_type: The type of the entity to create.

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();
}