mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 23:04:58 +00:00
Configure routes using annotation
This commit is contained in:
@@ -40,6 +40,9 @@ class SearchController extends AbstractController
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/search/advanced/{name}", name="chill_main_advanced_search")
|
||||
*/
|
||||
public function advancedSearchAction($name, Request $request)
|
||||
{
|
||||
try {
|
||||
@@ -85,6 +88,9 @@ class SearchController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/search/advanced", name="chill_main_advanced_search_list")
|
||||
*/
|
||||
public function advancedSearchListAction(Request $request)
|
||||
{
|
||||
/** @var Chill\MainBundle\Search\SearchProvider $variable */
|
||||
@@ -101,6 +107,9 @@ class SearchController extends AbstractController
|
||||
return $this->render('@ChillMain/Search/choose_list.html.twig');
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/search.{_format}", name="chill_main_search", requirements={"_format"="html|json"}, defaults={"_format"="html"})
|
||||
*/
|
||||
public function searchAction(Request $request, $_format)
|
||||
{
|
||||
$pattern = trim((string) $request->query->get('q', ''));
|
||||
@@ -190,6 +199,9 @@ class SearchController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/api/1.0/search.{_format}", name="chill_main_search_global", requirements={"_format"="json"}, defaults={"_format"="json"})
|
||||
*/
|
||||
public function searchApi(Request $request, $_format): JsonResponse
|
||||
{
|
||||
//TODO this is an incomplete implementation
|
||||
|
Reference in New Issue
Block a user