public function testInitialState() { $this->assertTrue($this->ckEditorType->isEnable()); $this->assertSame('bundles/ckeditor/', $this->ckEditorType->getBasePath()); $this->assertSame('bundles/ckeditor/ckeditor.js', $this->ckEditorType->getJsPath()); $this->assertSame($this->configManagerMock, $this->ckEditorType->getConfigManager()); $this->assertSame($this->pluginManagerMock, $this->ckEditorType->getPluginManager()); $this->assertSame($this->stylesSetManagerMock, $this->ckEditorType->getStylesSetManager()); $this->assertSame($this->templateManagerMock, $this->ckEditorType->getTemplateManager()); }
/** * {@inheritdoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { $pool = $this->pool; $translator = $this->translator; $formatters = array(); foreach ($pool->getFormatters() as $code => $instance) { $formatters[$code] = $translator->trans($code, array(), 'SonataFormatterBundle'); } $resolver->setDefaults(array('inherit_data' => true, 'event_dispatcher' => null, 'format_field' => null, 'ckeditor_toolbar_icons' => array(array('Bold', 'Italic', 'Underline', '-', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo', '-', 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', '-', 'Image', 'Link', 'Unlink', 'Table'), array('Maximize', 'Source')), 'ckeditor_basepath' => $this->CKEditorType->getBasePath(), 'ckeditor_context' => null, 'ckeditor_plugins' => $this->CKEditorType->getPluginManager()->getPlugins(), 'ckeditor_styles' => $this->CKEditorType->getStylesSetManager()->getStylesSets(), 'ckeditor_templates' => $this->CKEditorType->getTemplateManager()->getTemplates(), 'ckeditor_auto_inline' => $this->CKEditorType->isAutoInline(), 'ckeditor_inline' => $this->CKEditorType->isInline(), 'ckeditor_input_sync' => $this->CKEditorType->isInputSync(), 'format_field_options' => array('choices' => $formatters), 'source_field' => null, 'source_field_options' => array('attr' => array('class' => 'span10 col-sm-10 col-md-10', 'rows' => 20)), 'target_field' => null, 'listener' => true)); $resolver->setRequired(array('format_field', 'source_field', 'target_field')); }
/** * {@inheritdoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array('ckeditor_toolbar_icons' => array(array('Bold', 'Italic', 'Underline', '-', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo', '-', 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', '-', 'Image', 'Link', 'Unlink', 'Table'), array('Maximize', 'Source')), 'ckeditor_basepath' => $this->CKEditorType->getBasePath(), 'ckeditor_context' => null, 'ckeditor_plugins' => $this->CKEditorType->getPluginManager()->getPlugins(), 'ckeditor_styles' => $this->CKEditorType->getStylesSetManager()->getStylesSets(), 'ckeditor_templates' => $this->CKEditorType->getTemplateManager()->getTemplates(), 'ckeditor_auto_inline' => $this->CKEditorType->isAutoInline(), 'ckeditor_inline' => $this->CKEditorType->isInline(), 'ckeditor_input_sync' => $this->CKEditorType->isInputSync(), 'format_options' => array('attr' => array('class' => 'span10 col-sm-10 col-md-10', 'rows' => 20)))); $resolver->setRequired(array('format')); }