Esempio n. 1
0
 protected function setUp()
 {
     parent::setUp();
     $this->editorManager = $this->container->get('plugin.manager.quickedit.editor');
     $this->accessChecker = new MockEditEntityFieldAccessCheck();
     $this->editorSelector = new EditorSelector($this->editorManager, $this->container->get('plugin.manager.field.formatter'));
     $this->metadataGenerator = new MetadataGenerator($this->accessChecker, $this->editorSelector, $this->editorManager);
 }
 protected function setUp()
 {
     parent::setUp();
     // Install the Filter module.
     // Create a field.
     $this->fieldName = 'field_textarea';
     $this->createFieldWithStorage($this->fieldName, 'text', 1, 'Long text field', array(), 'text_textarea', array('size' => 42), 'text_default', array());
     // Create text format.
     $full_html_format = FilterFormat::create(array('format' => 'full_html', 'name' => 'Full HTML', 'weight' => 1, 'filters' => array()));
     $full_html_format->save();
     // Associate text editor with text format.
     $editor = Editor::create(['format' => $full_html_format->id(), 'editor' => 'unicorn']);
     $editor->save();
     // Also create a text format without an associated text editor.
     FilterFormat::create(array('format' => 'no_editor', 'name' => 'No Text Editor', 'weight' => 2, 'filters' => array()))->save();
 }
Esempio n. 3
0
 protected function setUp()
 {
     parent::setUp();
     $this->editorManager = $this->container->get('plugin.manager.quickedit.editor');
     $this->editorSelector = new EditorSelector($this->editorManager, $this->container->get('plugin.manager.field.formatter'));
 }