fix error in recompose pattern

This commit is contained in:
Julien Fastré 2016-05-27 17:15:54 +02:00
parent 329d688b5a
commit 9be006a946

View File

@ -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');