<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Entity;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\DomCrawler\Crawler;
use Doctrine\ORM\EntityManagerInterface;
use App\Entity\OmeloPage;
use App\Entity\CarrierPost;
use App\Entity\Corporative;
use App\Service\UserService;
class CorporativeController extends AbstractController
{
/**
* @Route(
* "/cadeaux-corporatifs",
* name="corporative",
* )
* @Template("Omelo/Corporative/view.html.twig")
*/
public function corporative(EntityManagerInterface $em, UserService $userServ)
{
$twigData = array();
$twigData['corpoItems'] = $em->getRepository(Corporative::class)->findAll();
return $twigData;
}
}