public function testGetAndSetContentCss() { $option = new WysiwygOption(); $this->assertArraySubset(array('/bundles/enhavoapp/css/editor.css', '/bundles/path/'), $option->getContentCss('path')); $this->assertArraySubset(array('/bundles/enhavoapp/css/editor.css'), $option->getContentCss()); $option->setContentCss(['path1', 'path2']); $this->assertArraySubset(['/bundles/enhavoapp/css/editor.css', '/bundles/path1/', '/bundles/path2/'], $option->getContentCss()); }
public function testGetAndSetContentCss() { $option = new WysiwygOption(); $this->assertEquals('/bundles/path/', $option->getContentCss('path')); $this->assertEquals(null, $option->getContentCss('')); $option->setContentCss(['path1', 'path2']); $this->assertArraySubset(['/bundles/path1/', '/bundles/path2/'], $option->getContentCss()); }
/** * {@inheritdoc} */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars['id'] = uniqid(self::$uniqueIdPrefix++); $option = new WysiwygOption(); $option->setFormats($options['formats']); $option->setToolbar1($options['toolbar1']); $option->setToolbar2($options['toolbar2']); $option->setHeight($options['height']); $option->setContentCss($options['content_css']); $view->vars['config'] = $this->config->getData($option); }