src/Controller/ZavodyController.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. use Doctrine\DBAL\Connection;
  7. use App\Model\Zavody;
  8. class ZavodyController extends AbstractController
  9. {
  10.     /**
  11.      * @Route("/zavody/{raceYear}", name="zavody")
  12.      */
  13.     public function index(Connection $connZavody $zavody$raceYear): Response
  14.     {
  15.         
  16.         $listEvents $zavody->listEvents($conn,$raceYear);
  17.         return $this->render('zavody/index.html.twig', [
  18.             'title' => 'Zavody '.$raceYear,
  19.             'listEvents' => $listEvents
  20.         ]);
  21.     }
  22. }