aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Filter/EntryFilterType.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-09-12 17:08:12 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-09-12 17:08:12 +0200
commita3bcd60a378946a68e67a3b609d7ef126b014ee6 (patch)
treeb9678878588c6bccc37a6c11c094f59f93e210ac /src/Wallabag/CoreBundle/Filter/EntryFilterType.php
parent9c08a891f9bb90bc3f23a575a734283c1ee00ba1 (diff)
downloadwallabag-a3bcd60a378946a68e67a3b609d7ef126b014ee6.tar.gz
wallabag-a3bcd60a378946a68e67a3b609d7ef126b014ee6.tar.zst
wallabag-a3bcd60a378946a68e67a3b609d7ef126b014ee6.zip
filter for entries with previewPicture
Diffstat (limited to 'src/Wallabag/CoreBundle/Filter/EntryFilterType.php')
-rw-r--r--src/Wallabag/CoreBundle/Filter/EntryFilterType.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php
index 85d1a061..c0b89196 100644
--- a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php
+++ b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php
@@ -39,10 +39,17 @@ class EntryFilterType extends AbstractType
39 $expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%')); 39 $expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%'));
40 40
41 return $filterQuery->createCondition($expression); 41 return $filterQuery->createCondition($expression);
42 }, 42 },
43 )) 43 ))
44 ->add('isArchived', 'filter_checkbox') 44 ->add('isArchived', 'filter_checkbox')
45 ->add('isStarred', 'filter_checkbox'); 45 ->add('isStarred', 'filter_checkbox')
46 ->add('previewPicture', 'filter_checkbox', array(
47 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
48 $expression = $filterQuery->getExpr()->isNotNull($field);
49
50 return $filterQuery->createCondition($expression);
51 },
52 ));
46 } 53 }
47 54
48 public function getName() 55 public function getName()