mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
renaming SEARCH_PREVIEW => SEARCH_PREVIEW_OPTION
This commit is contained in:
parent
d20404bc3c
commit
ede767d01a
@ -59,10 +59,10 @@ class SearchController extends Controller
|
||||
// no specific search selected. Rendering result in "preview" mode
|
||||
$results = $this->get('chill.main.search_provider')
|
||||
->getSearchResults(
|
||||
$pattern,
|
||||
0,
|
||||
5,
|
||||
array(SearchInterface::SEARCH_PREVIEW => true)
|
||||
$pattern,
|
||||
0,
|
||||
5,
|
||||
array(SearchInterface::SEARCH_PREVIEW_OPTION => true)
|
||||
);
|
||||
} else {
|
||||
// we want search on a specific search provider. Display full results.
|
||||
@ -73,15 +73,15 @@ class SearchController extends Controller
|
||||
|
||||
$results = [$this->get('chill.main.search_provider')
|
||||
->getResultByName(
|
||||
$pattern,
|
||||
$name,
|
||||
$paginatorFactory->getCurrentPageFirstItemNumber(),
|
||||
$pattern,
|
||||
$name,
|
||||
$paginatorFactory->getCurrentPageFirstItemNumber(),
|
||||
$paginatorFactory->getCurrentItemPerPage(),
|
||||
array(SearchInterface::SEARCH_PREVIEW => false)
|
||||
array(SearchInterface::SEARCH_PREVIEW_OPTION => false)
|
||||
)];
|
||||
}
|
||||
} catch (UnknowSearchDomainException $ex) {
|
||||
return $this->render('ChillMainBundle:Search:error.html.twig',
|
||||
return $this->render('ChillMainBundle:Search:error.html.twig',
|
||||
array(
|
||||
"message" => $this->get('translator')->trans("The domain %domain% "
|
||||
. "is unknow. Please check your search.", array('%domain%' => $ex->getDomain())),
|
||||
@ -90,7 +90,7 @@ class SearchController extends Controller
|
||||
} catch (UnknowSearchNameException $ex) {
|
||||
throw $this->createNotFoundException("The name ".$ex->getName()." is not found");
|
||||
} catch (ParsingException $ex) {
|
||||
return $this->render('ChillMainBundle:Search:error.html.twig',
|
||||
return $this->render('ChillMainBundle:Search:error.html.twig',
|
||||
array(
|
||||
"message" => $this->get('translator')->trans('Invalid terms').
|
||||
": ".$this->get('translator')->trans($ex->getMessage()),
|
||||
@ -99,8 +99,8 @@ class SearchController extends Controller
|
||||
}
|
||||
|
||||
|
||||
return $this->render('ChillMainBundle:Search:list.html.twig',
|
||||
array('results' => $results, 'pattern' => $pattern)
|
||||
return $this->render('ChillMainBundle:Search:list.html.twig',
|
||||
array('results' => $results, 'pattern' => $pattern)
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user