editorPluginManager example

public function id() {
    return $this->format;
  }

  /** * {@inheritdoc} */
  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 $e) {
      // 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.     }
  }

  /** * {@inheritdoc} */
Home | Imprint | This part of the site doesn't use cookies.