Commit f28c693d by Van

Normalement c'est good la surcharge

parent c66488f1
......@@ -57,35 +57,37 @@ class SearchController extends Base
public function search()
{
$formData = $this->app['request']->request->get('resa');
if ($formData){
if(!empty($formData['Type'])) {
foreach ($formData['Type'] as $typology) {
$this->contentSlugs[] = (!empty($this->configContent[$typology]['slug'])) ? $this->configContent[$typology]['slug'] : null;
if(!empty($formData['Type'])) {
foreach ($formData['Type'] as $typology) {
$this->contentSlugs[] = (!empty($this->configContent[$typology]['slug'])) ? $this->configContent[$typology]['slug'] : null;
}
}
}
$this->_saveBaseFormData();
try {
$this->ellohaRequest
->setData($formData)
->launchApiSearch()
;
} finally {
$idsProduct = $this->ellohaRequest->getIdProducts();
$results = $this->_searchReservableContents($idsProduct, $formData);
$this->_saveBaseFormData();
try {
return $this->render($this->config['results_elloha_template'], [
'results' => $results
]);
} catch (\Exception $e) {
return $this->render('@elloha/Frontend/search/results.html.twig', [
'results' => $results
]);
$this->ellohaRequest
->setData($formData)
->launchApiSearch()
;
} finally {
$idsProduct = $this->ellohaRequest->getIdProducts();
$results = $this->_searchReservableContents($idsProduct, $formData);
try {
return $this->render($this->config['results_elloha_template'], [
'results' => $results
]);
} catch (\Exception $e) {
return $this->render('@elloha/Frontend/search/results.html.twig', [
'results' => $results
]);
}
}
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment