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

DashboardAdminAdminController.php 1.5KB

3 年前
3 年前
3 年前
3 年前
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. $assets->addWebpackEncoreEntry('carac-product');
  25. return $assets;
  26. }
  27. public function configureUserMenu(UserInterface $user): UserMenu
  28. {
  29. return parent::configureUserMenu($user)
  30. ->setMenuItems(
  31. [
  32. MenuItem::linkToRoute('Mon profil', 'fa fa-id-card', 'sov_admin_account_profile'),
  33. MenuItem::linkToLogout('Déconnexion', 'sign-out-alt'),
  34. ]
  35. );
  36. }
  37. }