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

43 行
1.4KB

  1. <?php
  2. namespace Lc\SovBundle\Controller\Admin;
  3. use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
  4. use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard;
  5. use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
  6. use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController;
  7. use Lc\SovBundle\Doctrine\EntityManager;
  8. use Lc\SovBundle\Model\User\UserInterface;
  9. use Symfony\Component\HttpFoundation\Response;
  10. use Symfony\Component\Routing\Annotation\Route;
  11. class DashboardController extends AbstractDashboardController
  12. {
  13. public function index(): Response
  14. {
  15. return $this->render('@LcSov/dashboard.html.twig');
  16. }
  17. public function configureDashboard(): Dashboard
  18. {
  19. return Dashboard::new()
  20. // the name visible to end users
  21. ->setTitle('LA CLIC !')
  22. // you can include HTML contents too (e.g. to link to an image)
  23. ->setTitle('<img src="assets/img/laclic.png" width="100px">')
  24. // the path defined in this method is passed to the Twig asset() function
  25. ->setFaviconPath('favicon.svg')
  26. // the domain used by default is 'messages'
  27. ->setTranslationDomain('lcadmin');
  28. }
  29. public function configureCrud(): Crud
  30. {
  31. $crud = Crud::new();
  32. return $crud
  33. ->addFormTheme('@FOSCKEditor/Form/ckeditor_widget.html.twig');
  34. }
  35. }