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