Use Breadcrumb class
Convert to use NavList::PRESENT_LINK constant
This commit is contained in:
parent
f17be14174
commit
a42ce28f14
@ -6,6 +6,7 @@ use App\Entity\MemberCase;
|
|||||||
use App\Entity\Referral;
|
use App\Entity\Referral;
|
||||||
use App\Entity\User;
|
use App\Entity\User;
|
||||||
use App\Form\ReferralFormType;
|
use App\Form\ReferralFormType;
|
||||||
|
use App\Libs\Breadcrumb;
|
||||||
use App\Libs\NavList;
|
use App\Libs\NavList;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
@ -21,6 +22,7 @@ class ReferralController extends AbstractController
|
|||||||
private array $navLinks = []
|
private array $navLinks = []
|
||||||
) {
|
) {
|
||||||
$this->navLinks = NavList::LIST;
|
$this->navLinks = NavList::LIST;
|
||||||
|
$this->navLinks['case_list'] = NavList::PRESENT_LINK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/list-referrals/{id}', name: 'app_list_referrals')]
|
#[Route('/list-referrals/{id}', name: 'app_list_referrals')]
|
||||||
@ -36,8 +38,8 @@ class ReferralController extends AbstractController
|
|||||||
$this->navLinks,
|
$this->navLinks,
|
||||||
[
|
[
|
||||||
'breadcrumbs' => [
|
'breadcrumbs' => [
|
||||||
'Case',
|
new Breadcrumb($this->generateUrl('app_list_cases'), 'List Cases'),
|
||||||
'Referrals'
|
new Breadcrumb($this->generateUrl('app_list_referrals', ['id' => $case->getId()]), 'Referrals'),
|
||||||
],
|
],
|
||||||
'notifications' => $user->retrieveUnreadNotifications(),
|
'notifications' => $user->retrieveUnreadNotifications(),
|
||||||
'case' => $case,
|
'case' => $case,
|
||||||
@ -74,8 +76,9 @@ class ReferralController extends AbstractController
|
|||||||
$this->navLinks,
|
$this->navLinks,
|
||||||
[
|
[
|
||||||
'breadcrumbs' => [
|
'breadcrumbs' => [
|
||||||
'Case',
|
new Breadcrumb($this->generateUrl('app_list_cases'), 'List Cases'),
|
||||||
'Add Referral'
|
new Breadcrumb($this->generateUrl('app_list_referrals', ['id' => $case->getId()]), 'Referrals'),
|
||||||
|
new Breadcrumb($this->generateUrl('app_case_add_referral', ['id' => $case->getId()]), 'Add Referral')
|
||||||
],
|
],
|
||||||
'notifications' => $user->retrieveUnreadNotifications(),
|
'notifications' => $user->retrieveUnreadNotifications(),
|
||||||
'case' => $case,
|
'case' => $case,
|
||||||
@ -108,8 +111,9 @@ class ReferralController extends AbstractController
|
|||||||
$this->navLinks,
|
$this->navLinks,
|
||||||
[
|
[
|
||||||
'breadcrumbs' => [
|
'breadcrumbs' => [
|
||||||
'Case',
|
new Breadcrumb($this->generateUrl('app_list_cases'), 'List Cases'),
|
||||||
'Edit Referral'
|
new Breadcrumb($this->generateUrl('app_list_referrals', ['id' => $case->getId()]), 'Referrals'),
|
||||||
|
new Breadcrumb($this->generateUrl('app_case_edit_referral', ['caseId' => $case->getId(), 'referralId' => $referral->getId()]), 'Edit Referral'),
|
||||||
],
|
],
|
||||||
'notifications' => $user->retrieveUnreadNotifications(),
|
'notifications' => $user->retrieveUnreadNotifications(),
|
||||||
'case' => $case,
|
'case' => $case,
|
||||||
|
Loading…
Reference in New Issue
Block a user