WellCommerce\Bundle\DictionaryBundle\Form\Admin\DictionaryFormBuilder::buildForm PHP Method

buildForm() public method

public buildForm ( WellCommerce\Component\Form\Elements\FormInterface $form )
$form WellCommerce\Component\Form\Elements\FormInterface
    public function buildForm(FormInterface $form)
    {
        $requiredData = $form->addChild($this->getElement('nested_fieldset', ['name' => 'required_data', 'label' => $this->trans('common.fieldset.general')]));
        $requiredData->addChild($this->getElement('text_field', ['name' => 'identifier', 'label' => $this->trans('dictionary.label.identifier'), 'rules' => [$this->getRule('required')]]));
        $languageData = $requiredData->addChild($this->getElement('language_fieldset', ['name' => 'translations', 'label' => $this->trans('common.fieldset.translations'), 'transformer' => $this->getRepositoryTransformer('translation', $this->get('dictionary.repository'))]));
        $languageData->addChild($this->getElement('text_field', ['name' => 'value', 'label' => $this->trans('dictionary.label.value'), 'rules' => [$this->getRule('required')]]));
        $form->addFilter($this->getFilter('no_code'));
        $form->addFilter($this->getFilter('trim'));
        $form->addFilter($this->getFilter('secure'));
    }
DictionaryFormBuilder