Editor::__construct

public Editor::__construct(array $values, $entity_type)

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 83

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();
}
doc_Drupal
2016-10-29 09:03:44
Comments
Leave a Comment

Please login to continue.