src/Controller/DefaultController.php line 26

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Doctrine\ORM\EntityManagerInterface;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Request;
  6. use App\Entity\Team;
  7. use App\Entity\Role;
  8. use Symfony\Component\Routing\Annotation\Route;
  9. //use App\Form\EquipeType;
  10. class DefaultController extends AbstractController
  11. {
  12.     protected $entityManager;
  13.     public function __construct(EntityManagerInterface $entityManager){
  14.         $this->entityManager $entityManager;
  15.     }
  16.     /**
  17.      * @Route("/", name="front_index")
  18.      */
  19.     public function index()
  20.     {
  21.         $projects $this->entityManager->getRepository('App:Project')->findAllProjects(3);
  22.         return $this->render('Default/index.html.twig', ['projects'=>$projects]);
  23.     }
  24.     public function newsAction() {
  25.         return $this->render('ISLCrearchitexBundle:Default:news.html.twig');
  26.     }
  27.     public function contactAction() {
  28.         return $this->render('ISLCrearchitexBundle:Default:contact.html.twig');
  29.     }
  30. }