src/Controller/CorporativeController.php line 35

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\Routing\Annotation\Route;
  5. use Symfony\Component\HttpFoundation\Request;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use Symfony\Component\HttpFoundation\JsonResponse;
  8. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  9. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
  10. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Entity;
  11. use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
  12. use Symfony\Component\DomCrawler\Crawler;
  13. use Doctrine\ORM\EntityManagerInterface;
  14. use App\Entity\OmeloPage;
  15. use App\Entity\CarrierPost;
  16. use App\Entity\Corporative;
  17. use App\Service\UserService;
  18. class CorporativeController extends AbstractController
  19. {
  20.     /**
  21.      * @Route(
  22.      *      "/cadeaux-corporatifs", 
  23.      *      name="corporative", 
  24.      *  )
  25.      * @Template("Omelo/Corporative/view.html.twig")
  26.      */
  27.     public function corporative(EntityManagerInterface $emUserService $userServ)
  28.     {
  29.         $twigData = array();
  30.         $twigData['corpoItems'] = $em->getRepository(Corporative::class)->findAll();
  31.         return $twigData;
  32.     }
  33. }