Replaced nav links with NavLinks class

This commit is contained in:
Ryan Prather 2024-12-02 23:58:23 -05:00
parent ac442e65b6
commit 167bc5b626

View File

@ -3,7 +3,7 @@
namespace App\Controller; namespace App\Controller;
use App\Entity\User; use App\Entity\User;
use App\Form\UserFormType; use App\Libs\NavList;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
@ -20,13 +20,7 @@ class DefaultController extends AbstractController
private readonly UserPasswordHasherInterface $userPasswordHasher, private readonly UserPasswordHasherInterface $userPasswordHasher,
private array $navLinks = [] private array $navLinks = []
) { ) {
$this->navLinks = [ $this->navLinks = NavList::LIST;
'admin_dashboard' => 'nav-link text-dark',
'user_dashboard' => 'nav-link text-dark',
'profile' => 'nav-link text-dark',
'user_list' => 'nav-link text-dark',
'staff_dashboard' => 'nav-link text-dark',
];
} }
#[Route('/dashboard', name: 'app_dashboard')] #[Route('/dashboard', name: 'app_dashboard')]