src/Controller/IndexController.php line 73

Open in your IDE?
  1. <?php
  2. // src/Controller/EntrepriseController.php
  3. namespace App\Controller;
  4. use App\Entity\SujetFAQ;
  5. use App\Entity\Article;
  6. use App\Entity\AppUser;
  7. use App\Entity\Product;
  8. use App\Entity\Review;
  9. use App\Entity\Category;
  10. use App\Entity\Order;
  11. use App\Entity\SlidePromo;
  12. use App\Entity\ProductOrder;
  13. use App\Entity\Entreprise;
  14. use App\Entity\ProductMisDeCote;
  15. use App\Entity\SubCategory;
  16. use App\Entity\AvisUtilisateur;
  17. use App\Form\SujetFAQType;
  18. use App\Form\AvisUtilisateurType;
  19. use App\Form\AvisUtilisateurEditType;
  20. use App\Form\ProductType;
  21. use App\Entity\ShippingMethod;
  22. use App\Entity\AbonneNewsletter;
  23. use App\Entity\Coupon;
  24. use App\Entity\EnseignantClasse;
  25. use App\Entity\UserEcole;
  26. use App\Entity\ClasseUser;
  27. use App\Entity\Produit;
  28. use App\Entity\Ecole;
  29. use App\Entity\UneClasse;
  30. use App\Entity\CategorieEntreprise;
  31. use Symfony\Component\HttpFoundation\Response;
  32. use Symfony\Component\HttpFoundation\Session\SessionInterface;
  33. use Symfony\Component\HttpFoundation\Request;
  34. use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
  35. use Symfony\Component\Routing\Annotation\Route;
  36. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  37. /**
  38.  * @Route("")
  39.  */
  40. class IndexController extends AbstractController
  41. {    
  42.     
  43.     /**
  44.      * @Route("", name="home_first")
  45.      * @return \Symfony\Component\HttpFoundation\Response
  46.      *
  47.      */
  48.     public function indexFirstAction()
  49.     {
  50.         $em $this->getDoctrine()
  51.                     ->getManager();
  52.         $ic $this->indexContentAction();
  53.         $q '';
  54.         
  55.         $leRole  '';
  56.         $user $this->getUser();
  57.         
  58.         
  59.         return $this->render('entreprise/accueil.html.twig', [
  60.             'leRole' => $leRole
  61.         ]);
  62.     }
  63.     
  64.     
  65.     /**
  66.      * @Route("/{_locale}", name="home")
  67.      * @return \Symfony\Component\HttpFoundation\Response
  68.      */
  69.     public function indexAction($_locale 'fr')
  70.     {
  71.         $em $this->getDoctrine()
  72.                     ->getManager();
  73.         $q '';
  74.         $ic $this->indexContentAction();
  75.         
  76.         
  77.         $localite 'Abidjan';
  78.                     
  79.             
  80.         $leRole '';
  81.         
  82.         
  83.         
  84.         return $this->render('entreprise/accueil.html.twig', [
  85.             'leRole' => $leRole
  86.         ]);
  87.     }
  88.     
  89.     /**
  90.      * @Route("{_locale}/chose-language", name="change_language")
  91.      * @return \Symfony\Component\HttpFoundation\Response
  92.      */
  93.     public function changeLanguageAction()
  94.     {
  95.         $languages = array(
  96.             'fr' => array(
  97.                 'short' => 'fr',
  98.                 'long' => 'Français'
  99.             ),
  100.             'en' => array(
  101.                 'short' => 'en',
  102.                 'long' => 'English'
  103.             )
  104.             );
  105.         return $this->render('entreprise/change_language.html.twig', [
  106.             'languages' => $languages
  107.         ]);
  108.     }
  109.     public function indexContentAction()
  110.     {
  111.     }
  112. }