src/Controller/SearchController.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\BFEdition;
  4. use App\Entity\BFDistance;
  5. use App\Object\FestivalSearch;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. use Symfony\Component\HttpFoundation\Response;
  8. use Symfony\Component\HttpFoundation\Request;
  9. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  10. use App\Form\Type\FestivalSearchType;
  11. use App\Utilities\EditionUtilities;
  12. use Knp\Component\Pager\PaginatorInterface;
  13. use Symfony\Component\HttpFoundation\Session\SessionInterface;
  14. class SearchController extends AbstractController
  15. {
  16.     public function homesearch(Request $request)
  17.     {
  18.         $search = new FestivalSearch();
  19.         
  20.         $form $this->createForm(FestivalSearchType::class, $search,
  21.                 ['action' => $this->generateUrl('home_route',[
  22.                     'routename' => 'search'
  23.                 ])]);
  24.         
  25.         
  26.         return $this->render('form/searchform.html.twig', [
  27.             'form' => $form->createView(),
  28.             'uuid' => uniqid(),
  29.         ]);
  30.     }
  31. }
  32. ?>