Esempio n. 1
0
 /**
  * Wysiwyg constructor.
  * @param ContextInterface $context
  * @param Form $form
  * @param EditorElement $editorElement
  * @param ConfigInterface $wysiwygConfig
  * @param array $components
  * @param array $data
  */
 public function __construct(ContextInterface $context, Form $form, EditorElement $editorElement, ConfigInterface $wysiwygConfig, array $components = [], array $data = [])
 {
     $this->editorElement = $editorElement;
     $this->editorElement->setForm($form);
     $this->editorElement->setData('force_load', true);
     $this->editorElement->setData('rows', 20);
     $this->editorElement->setData('name', $data['name']);
     $this->editorElement->setData('html_id', $data['name'] . 'Editor');
     $this->editorElement->setConfig($wysiwygConfig->getConfig());
     $data['config']['content'] = $editorElement->getElementHtml();
     parent::__construct($context, $components, $data);
 }