namespace Wallabag\CoreBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
+use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
- ->add('theme', 'choice', array(
+ ->add('theme', ChoiceType::class, array(
'choices' => array_flip($this->themes),
'choices_as_values' => true,
))
->add('items_per_page')
- ->add('language', 'choice', array(
- 'choices' => $this->languages,
+ ->add('language', ChoiceType::class, array(
+ 'choices' => array_flip($this->languages),
+ 'choices_as_values' => true,
))
- ->add('save', 'submit')
+ ->add('save', SubmitType::class)
;
}
));
}
- public function getName()
+ public function getBlockPrefix()
{
return 'config';
}