From 9be006a9466b8cfe7e112ac78d01afdcaa8ffe28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 27 May 2016 17:15:54 +0200 Subject: [PATCH] fix error in recompose pattern --- Search/EventSearch.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Search/EventSearch.php b/Search/EventSearch.php index 882dd2a77..62f4e1604 100644 --- a/Search/EventSearch.php +++ b/Search/EventSearch.php @@ -89,11 +89,16 @@ class EventSearch extends AbstractSearch return $this->templating->render('ChillEventBundle:Event:list.html.twig', array( 'events' => $this->search($terms, $start, $limit, $options), - 'pattern' => $this->recomposePattern($terms, array(), $terms['_domain']), + 'pattern' => $this->recomposePattern($terms, $this->getAvailableTerms(), $terms['_domain']), 'total' => $this->count($terms) )); } + protected function getAvailableTerms() + { + return array('date-from', 'date-to', 'name', 'date'); + } + protected function search(array $terms, $start, $limit, $options) { $qb = $this->er->createQueryBuilder('e');