| @@ 23-35 (lines=13) @@ | ||
| 20 | /** |
|
| 21 | * @Route("/", defaults={"page": "1"}, methods={"GET"}, name="property") |
|
| 22 | */ |
|
| 23 | public function search(Request $request, FilterRepository $repository, RequestToArrayTransformer $transformer): Response |
|
| 24 | { |
|
| 25 | $searchParams = $transformer->transform($request); |
|
| 26 | $properties = $repository->findByFilter($searchParams); |
|
| 27 | ||
| 28 | return $this->render('property/index.html.twig', |
|
| 29 | [ |
|
| 30 | 'site' => $this->site(), |
|
| 31 | 'properties' => $properties, |
|
| 32 | 'searchParams' => $searchParams, |
|
| 33 | ] |
|
| 34 | ); |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * @Route("/map", methods={"GET"}, name="map_view") |
|
| @@ 23-33 (lines=11) @@ | ||
| 20 | /** |
|
| 21 | * @Route("/admin/property", defaults={"page": "1"}, methods={"GET"}, name="admin_property") |
|
| 22 | */ |
|
| 23 | public function index(Request $request, FilterRepository $repository, RequestToArrayTransformer $transformer): Response |
|
| 24 | { |
|
| 25 | $searchParams = $transformer->transform($request); |
|
| 26 | $properties = $repository->findByFilter($searchParams); |
|
| 27 | ||
| 28 | return $this->render('admin/property/index.html.twig', [ |
|
| 29 | 'site' => $this->site(), |
|
| 30 | 'properties' => $properties, |
|
| 31 | 'searchParams' => $searchParams, |
|
| 32 | ]); |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * @Route("/admin/property/new", name="admin_property_new") |
|