aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/EntrySortType.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/EntrySortType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/EntrySortType.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/EntrySortType.php b/src/Wallabag/CoreBundle/Form/Type/EntrySortType.php
index 2555f68d..ac251c5b 100644
--- a/src/Wallabag/CoreBundle/Form/Type/EntrySortType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/EntrySortType.php
@@ -2,8 +2,6 @@
2 2
3namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
4 4
5use Doctrine\ORM\EntityRepository;
6use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\CheckboxFilterType;
7use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\ChoiceFilterType; 5use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\ChoiceFilterType;
8use Symfony\Component\Form\AbstractType; 6use Symfony\Component\Form\AbstractType;
9use Symfony\Component\Form\FormBuilderInterface; 7use Symfony\Component\Form\FormBuilderInterface;
@@ -26,12 +24,20 @@ class EntrySortType extends AbstractType
26 public function buildForm(FormBuilderInterface $builder, array $options) 24 public function buildForm(FormBuilderInterface $builder, array $options)
27 { 25 {
28 $builder 26 $builder
29 ->add('sortOrder', CheckboxFilterType::class) 27 ->add('sortOrder', ChoiceFilterType::class, [
28 'choices' => [
29 'entry.sort.ascending' => 'asc',
30 'entry.sort.descending' => 'desc',
31 ],
32 'label' => 'entry.sort.order_label',
33 ])
30 ->add('sortType', ChoiceFilterType::class, [ 34 ->add('sortType', ChoiceFilterType::class, [
31 'choices' => [ 35 'choices' => [
32 'createdAt' => 'createdAt', 36 'entry.sort.by.creation_date' => 'createdAt',
33 'title' => 'title', 37 'entry.sort.by.starred_date' => 'starredAt',
34 'updatedAt' => 'updatedAt', 38 'entry.sort.by.archive_date' => 'archivedAt',
39 'entry.sort.by.title' => 'title',
40 'entry.sort.by.last_updated' => 'updatedAt',
35 ], 41 ],
36 'label' => 'entry.sort.status_label', 42 'label' => 'entry.sort.status_label',
37 ]) 43 ])