You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DashboardAdminAdminController.php 1.5KB

3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace Lc\CaracoleBundle\Controller\Dashboard;
  3. use EasyCorp\Bundle\EasyAdminBundle\Config\Assets;
  4. use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
  5. use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
  6. use EasyCorp\Bundle\EasyAdminBundle\Config\UserMenu;
  7. use Lc\SovBundle\Controller\Dashboard\DashboardAdminController as SovDashboardController;
  8. use Symfony\Component\Security\Core\User\UserInterface;
  9. class DashboardAdminAdminController extends SovDashboardController
  10. {
  11. public function configureCrud(): Crud
  12. {
  13. $crud = parent::configureCrud();
  14. $crud
  15. ->overrideTemplate('layout', '@LcCaracole/adminlte/layout.html.twig');
  16. return $crud;
  17. }
  18. public function configureAssets(): Assets
  19. {
  20. $assets = parent::configureAssets(); // TODO: Change the autogenerated stub
  21. $assets->addWebpackEncoreEntry('carac-common');
  22. $assets->addWebpackEncoreEntry('carac-switch-merchant');
  23. $assets->addWebpackEncoreEntry('carac-duplicate');
  24. return $assets;
  25. }
  26. public function configureUserMenu(UserInterface $user): UserMenu
  27. {
  28. return parent::configureUserMenu($user)
  29. ->setMenuItems(
  30. [
  31. MenuItem::linkToRoute('Mon profil', 'fa fa-id-card', 'sov_admin_account_profile'),
  32. MenuItem::linkToLogout('Déconnexion', 'sign-out-alt'),
  33. ]
  34. );
  35. }
  36. }