選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

DashboardController.php 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. }