wallabag/src/Form/Type/UploadImportType.php

35 lines
991 B
PHP
Raw Permalink Normal View History

2015-10-22 14:57:56 +00:00
<?php
2024-02-19 00:30:12 +00:00
namespace Wallabag\Form\Type;
2015-10-22 14:57:56 +00:00
use Symfony\Component\Form\AbstractType;
2016-02-12 14:59:13 +00:00
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
2017-07-01 07:52:38 +00:00
use Symfony\Component\Form\Extension\Core\Type\FileType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
2015-10-22 14:57:56 +00:00
class UploadImportType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('file', FileType::class, [
'label' => 'import.form.file_label',
'required' => true,
])
->add('mark_as_read', CheckboxType::class, [
'label' => 'import.form.mark_as_read_label',
'required' => false,
])
->add('save', SubmitType::class, [
'label' => 'import.form.save_label',
])
2015-10-22 14:57:56 +00:00
;
}
public function getBlockPrefix()
2015-10-22 14:57:56 +00:00
{
return 'upload_import_file';
}
}