/** * {@inheritdoc} */ public function finishView(FormView $view, FormInterface $form, array $options) { parent::finishView($view, $form, $options); $view->vars['preload_choices'] = $options['preload_choices']; $view->vars['choice_url'] = $options['choice_url']; $view->vars['choice_url_params'] = $options['choice_url_params']; }
/** * {@inheritdoc} */ public function configureOptions(OptionsResolver $resolver) { parent::configureOptions($resolver); $resolver->setDefaults(['choices' => [], 'preload_choices' => false, 'choice_url' => null, 'choice_url_params' => null]); }
public function testGetName() { $this->assertEquals(ChoiceFilterType::NAME, $this->type->getName()); }
/** * @param TranslatorInterface $translator * @param UserContext $userContext */ public function __construct(TranslatorInterface $translator, UserContext $userContext) { parent::__construct($translator); $this->userContext = $userContext; }
/** * {@inheritdoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { parent::setDefaultOptions($resolver); $resolver->setDefaults(['choices' => [], 'preload_choices' => false, 'choice_url' => null, 'choice_url_params' => null]); }