$test->getUri(), 'xmlString' => $xmlString ], $options ); } /** * {@inheritdoc} */ protected function initForm() : void { $this->form = new tao_helpers_form_xhtml_Form('test_xml_editor_form'); $this->form->setDecorators([ 'element' => new tao_helpers_form_xhtml_TagWrapper(['tag' => 'div']), 'error' => new tao_helpers_form_xhtml_TagWrapper([ 'tag' => 'div', 'cssClass' => 'form-error' ]) ]); $action = tao_helpers_form_FormFactory::getElement('save', 'Free'); $action->setValue(' ' . __('Save') . ''); $this->form->setActions([$action], 'bottom'); } /** * {@inheritdoc} */ protected function initElements() : void { $element = tao_helpers_form_FormFactory::getElement('xmlString', 'textarea'); $element->addAttribute('rows', '20'); $element->setDescription('XML'); $element->addValidator(tao_helpers_form_FormFactory::getValidator('NotEmpty')); $this->getForm()->addElement($element); $element = tao_helpers_form_FormFactory::getElement('id', 'Hidden'); $this->getForm()->addElement($element); } }