<?php
namespace App\Controller;
use App\Entity\Bibliotheque;
use App\Entity\Cms;
use App\Entity\Framework;
use App\Entity\Langage;
use App\Entity\Outil;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class CompetencesController extends AbstractController
{
public function __construct(EntityManagerInterface $manager)
{
$this->manager = $manager;
}
/**
* @Route("/competences", name="app_competences")
*/
public function allCompetences(): Response
{
// Récuperer toutes les types de compétences informatiques dans la BDD
$langages = $this->manager->getRepository(Langage::class)->findAll();
$cms = $this->manager->getRepository(Cms::class)->findAll();
$bibliotheques = $this->manager->getRepository(Bibliotheque::class)->findAll();
$outils = $this->manager->getRepository(Outil::class)->findAll();
$frameworks = $this->manager->getRepository(Framework::class)->findAll();
// Afficher toutes les compétences sur une seule et même page
return $this->render('competences/index.html.twig', [
'langages' => $langages,
'cms' => $cms,
'bibliotheques' => $bibliotheques,
'outils' => $outils,
'frameworks' => $frameworks,
]);
}
/**
* @Route("/competencesTab", name="app_competences_tab")
*/
public function allCompetencesTab(): Response
{
// Récuperer toutes les types de compétences informatiques dans la BDD
$langages = $this->manager->getRepository(Langage::class)->findAll();
$cms = $this->manager->getRepository(Cms::class)->findAll();
$bibliotheques = $this->manager->getRepository(Bibliotheque::class)->findAll();
$outils = $this->manager->getRepository(Outil::class)->findAll();
$frameworks = $this->manager->getRepository(Framework::class)->findAll();
// Afficher toutes les compétences sur une seule et même page
return $this->render('competences/indexTabCompose.html.twig', [
'langages' => $langages,
'cms' => $cms,
'bibliotheques' => $bibliotheques,
'outils' => $outils,
'frameworks' => $frameworks,
]);
}
}