2015-02-16 20:28:49 +00:00
|
|
|
<?php
|
|
|
|
namespace Wallabag\CoreBundle\Form\Type;
|
|
|
|
|
|
|
|
use Symfony\Component\Form\AbstractType;
|
|
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
|
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
|
|
|
|
|
|
|
class ConfigType extends AbstractType
|
|
|
|
{
|
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
|
|
|
{
|
|
|
|
$builder
|
|
|
|
->add('theme', 'choice', array(
|
|
|
|
'choices' => array(
|
|
|
|
'baggy' => 'Baggy',
|
|
|
|
'courgette' => 'Courgette',
|
|
|
|
'dark' => 'Dark',
|
|
|
|
'default' => 'Default',
|
|
|
|
'dmagenta' => 'Dmagenta',
|
|
|
|
'solarized' => 'Solarized',
|
|
|
|
'solarized_dark' => 'Solarized Dark',
|
|
|
|
),
|
|
|
|
))
|
2015-02-17 21:45:20 +00:00
|
|
|
->add('items_per_page', 'text')
|
2015-02-16 20:28:49 +00:00
|
|
|
->add('language')
|
|
|
|
->add('save', 'submit')
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
|
|
|
{
|
|
|
|
$resolver->setDefaults(array(
|
|
|
|
'data_class' => 'Wallabag\CoreBundle\Entity\Config',
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getName()
|
|
|
|
{
|
|
|
|
return 'config';
|
|
|
|
}
|
|
|
|
}
|