aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
index cd4d3490..f3f848e9 100644
--- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
@@ -87,6 +87,18 @@ class EntryFilterType extends AbstractType
87 ->add('isStarred', CheckboxFilterType::class, [ 87 ->add('isStarred', CheckboxFilterType::class, [
88 'label' => 'entry.filters.starred_label', 88 'label' => 'entry.filters.starred_label',
89 ]) 89 ])
90 ->add('isUnread', CheckboxFilterType::class, [
91 'label' => 'entry.filters.unread_label',
92 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
93 if (false === $values['value']) {
94 return;
95 }
96
97 $expression = $filterQuery->getExpr()->eq('e.isArchived', 'false');
98
99 return $filterQuery->createCondition($expression);
100 },
101 ])
90 ->add('previewPicture', CheckboxFilterType::class, [ 102 ->add('previewPicture', CheckboxFilterType::class, [
91 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { 103 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
92 if (false === $values['value']) { 104 if (false === $values['value']) {