src/Controller/EntrepriseController.php line 38

Open in your IDE?
  1. <?php
  2. // src/Controller/EntrepriseController.php
  3. namespace App\Controller;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. use Symfony\Component\HttpFoundation\Session\SessionInterface;
  7. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  8. /**
  9.  * @Route("/")
  10.  */
  11. class EntrepriseController extends AbstractController
  12. {    
  13.         private $session;
  14.     
  15.     public function __construct(SessionInterface $session)
  16.         {
  17.             $this->session $session;
  18.         }
  19.     /**
  20.      * @Route("/", name="home_first")
  21.      */
  22.     public function homeFirstAction()
  23.     {
  24.         $this->session->set('cart', array());
  25.         $domain '';
  26.         return $this->render('entreprise/accueil.html.twig', [
  27.             'domain' => $domain
  28.         ]);
  29.     }
  30.     
  31.     /**
  32.      * @Route("/{_locale}", name="home")
  33.      */
  34.     public function homeAction()
  35.     {
  36.         //$this->session->set('cart', array());
  37.         $domain '';
  38.         return $this->render('entreprise/accueil.html.twig', [
  39.             'domain' => $domain
  40.         ]);
  41.     }
  42.     
  43.     
  44.     
  45.         /**
  46.      * @Route("/{_locale}/contact", name="contact")
  47.      */
  48.     public function contactAction()
  49.     {
  50.         
  51.           return $this->render('entreprise/contact.html.twig', [
  52.             
  53.         ]);
  54.     }
  55. }