Convert to use NavList::PRESENT_LINK constant
This commit is contained in:
parent
a42ce28f14
commit
ef053bae29
@ -21,13 +21,13 @@ class ReferralSourceController extends AbstractController
|
||||
private array $navList = []
|
||||
) {
|
||||
$this->navList = NavList::LIST;
|
||||
$this->navList['referral_sources'] = NavList::PRESENT_LINK;
|
||||
}
|
||||
|
||||
#[Route('/list-referral-sources', name: 'app_referral_source')]
|
||||
public function listReferralSources(#[CurrentUser()] User $user): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_ADMIN');
|
||||
$this->navList['referral_sources'] = 'nav-link text-white active bg-gradient-dark';
|
||||
|
||||
$sources = $this->entityManager->getRepository(ReferralSource::class)->retrieveOrderedList();
|
||||
|
||||
@ -50,7 +50,6 @@ class ReferralSourceController extends AbstractController
|
||||
public function addSource(Request $request, #[CurrentUser()] User $user): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_ADMIN');
|
||||
$this->navList['referral_sources'] = 'nav-link text-white active bg-gradient-dark';
|
||||
|
||||
$rs = new ReferralSource();
|
||||
$form = $this->createForm(ReferralSourceFormType::class, $rs);
|
||||
@ -88,7 +87,6 @@ class ReferralSourceController extends AbstractController
|
||||
public function editSource(Request $request, #[CurrentUser()] User $user, string $id): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_ADMIN');
|
||||
$this->navList['referral_sources'] = 'nav-link text-white active bg-gradient-dark';
|
||||
|
||||
$rs = $this->entityManager->getRepository(ReferralSource::class)->find($id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user