]>
Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | ||
3 | namespace Wallabag\ImportBundle\Form\Type; | |
4 | ||
5 | use Symfony\Component\Form\AbstractType; | |
6 | use Symfony\Component\Form\FormBuilderInterface; | |
7 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | |
8 | use Symfony\Component\Form\Extension\Core\Type\FileType; | |
9 | use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | |
10 | ||
11 | class UploadImportType extends AbstractType | |
12 | { | |
13 | public function buildForm(FormBuilderInterface $builder, array $options) | |
14 | { | |
15 | $builder | |
16 | ->add('file', FileType::class) | |
17 | ->add('mark_as_read', CheckboxType::class, array( | |
18 | 'label' => 'Mark all as read', | |
19 | 'required' => false, | |
20 | )) | |
21 | ->add('save', SubmitType::class) | |
22 | ; | |
23 | } | |
24 | ||
25 | public function getBlockPrefix() | |
26 | { | |
27 | return 'upload_import_file'; | |
28 | } | |
29 | } |