Merge pull request #136 from StudioMaX/patch-1
Add configureOptions method to form types for SF 2.7
This commit is contained in:
commit
84760b0a9f
@ -7,6 +7,7 @@ use Symfony\Component\Form\FormView;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
@ -122,12 +123,21 @@ class CaptchaType extends AbstractType
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$this->options['mapped'] = false;
|
||||
$resolver->setDefaults($this->options);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* BC for SF < 2.7
|
||||
*/
|
||||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||
{
|
||||
$this->configureOptions($resolver);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user