form = tao_helpers_form_FormFactory::getForm('list'); $addElt = tao_helpers_form_FormFactory::getElement('add', 'Free'); $addElt->setValue(' ' . __('Add') . ''); $this->form->setActions([$addElt], 'bottom'); $this->form->setActions([], 'top'); } /** * @access public * @throws common_Exception */ public function initElements() { $this->createTextBoxElement(self::FIELD_NAME, __('Name')); $this->createTextBoxElement(self::FIELD_SOURCE_URL, __('Data source URI')); $this->createTextBoxElement(self::FIELD_ITEM_LABEL_PATH, __('Label Path')); $this->createTextBoxElement(self::FIELD_ITEM_URI_PATH, __('URI Path')); if (($this->options[self::IS_LISTS_DEPENDENCY_ENABLED] ?? false)) { $this->createTextBoxElement( self::FIELD_DEPENDENCY_ITEM_URI_PATH, __('Dependency URI Path'), false ); } } /** * @throws common_Exception */ private function createTextBoxElement(string $name, string $label, bool $addNotEmptyValidator = true): void { $element = tao_helpers_form_FormFactory::getElement($name, 'Textbox'); $element->setDescription($label); if ($addNotEmptyValidator) { $element->addValidator(tao_helpers_form_FormFactory::getValidator('NotEmpty')); } $this->form->addElement($element); } }