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.6KB

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