30 lines
863 B
PHP
30 lines
863 B
PHP
<?php
|
|
|
|
namespace App\Controller\Admin\Teamer;
|
|
|
|
use App\Entity\Teamer;
|
|
use App\Repository\TrainingRepository;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
use Symfony\Component\Routing\Attribute\Route;
|
|
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
|
|
|
class SkillsController extends AbstractController
|
|
{
|
|
public function __construct(private readonly TrainingRepository $trainingRepository)
|
|
{
|
|
}
|
|
|
|
#[Route('/admin/teamer/skills/{uuid}', name: 'app_admin_teamer_skills')]
|
|
#[IsGranted('ROLE_ADMIN')]
|
|
public function index(Teamer $teamer): Response
|
|
{
|
|
$trainings = $this->trainingRepository->getList();
|
|
|
|
return $this->render('admin/teamer/skills.html.twig', [
|
|
'teamer' => $teamer,
|
|
'trainings' => $trainings,
|
|
]);
|
|
}
|
|
}
|