您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

DashboardAdminAdminController.php 1.5KB

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