WIP: Implement admin CRUD
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\System\JobProfile;
|
||||
|
||||
use App\Repository\JobProfileRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class IndexController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly JobProfileRepository $jobProfileRepository)
|
||||
{}
|
||||
|
||||
#[Route('/admin/system/job-profile', name: 'app_admin_system_job_profile_index')]
|
||||
#[IsGranted('ROLE_ADMIN')]
|
||||
public function index(): Response
|
||||
{
|
||||
$jobProfiles = $this
|
||||
->jobProfileRepository
|
||||
->getList()
|
||||
;
|
||||
|
||||
return $this->render('admin/system/job_profile/index.html.twig', [
|
||||
'jobProfiles' => $jobProfiles,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user