Explorar el Código

Intégration easyadmin

master
Fab hace 3 años
padre
commit
2263b49f6e
Se han modificado 2 ficheros con 37 adiciones y 0 borrados
  1. +22
    -0
      src/Controller/Admin/DashboardController.php
  2. +15
    -0
      src/Controller/Admin/UserCrudController.php

+ 22
- 0
src/Controller/Admin/DashboardController.php Ver fichero

@@ -3,11 +3,33 @@
namespace App\Controller\Admin;


use App\Entity\Page;
use App\Entity\User;
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
use Lc\SovBundle\Controller\Admin\DashboardController as LcDashboardController;

class DashboardController extends LcDashboardController
{

public function configureMenuItems(): iterable
{
return [
MenuItem::linkToDashboard('Tableau de bord', 'fa fa-home'),
MenuItem::linkToCrud('Pages', 'fa fa-tags', Page::class),
MenuItem::linkToCrud('Utilisateurs', 'fa fa-user', User::class),


/*
MenuItem::section('Blog'),
MenuItem::linkToCrud('Categories', 'fa fa-tags', Category::class),
MenuItem::linkToCrud('Blog Posts', 'fa fa-file-text', BlogPost::class),

MenuItem::section('Users'),
MenuItem::linkToCrud('Comments', 'fa fa-comment', Comment::class),
MenuItem::linkToCrud('Users', 'fa fa-user', User::class),*/

//MenuItem::linkToLogout('Déconnexion', 'fa fa-exit'),
];
}

}

+ 15
- 0
src/Controller/Admin/UserCrudController.php Ver fichero

@@ -0,0 +1,15 @@
<?php

namespace App\Controller\Admin;

use App\Entity\User;
use Lc\SovBundle\Controller\Admin\UserCrudController as AbstractUserCrudController;

class UserCrudController extends AbstractUserCrudController
{
public static function getEntityFqcn(): string
{
return User::class;
}

}

Cargando…
Cancelar
Guardar