/** * {@inheritdoc} */ public function buildForm(FormInterface $form) { $requiredData = $form->addChild($this->getElement('nested_fieldset', ['name' => 'required_data', 'label' => $this->trans('form.fieldset.required_data')])); $requiredData->addChild($this->getElement('select', ['name' => 'code', 'label' => $this->trans('currency.code.label'), 'options' => $this->repository->getCurrenciesToSelect()])); $form->addFilter($this->getFilter('no_code')); $form->addFilter($this->getFilter('trim')); $form->addFilter($this->getFilter('secure')); }
/** * Returns all currencies from repository * * @return \WellCommerce\Bundle\IntlBundle\Entity\Currency[] */ protected function getCurrencies() { return $this->currencyRepository->findAll(); }