Browse Source

Intégration easyadmin

master
Fab 3 years ago
parent
commit
2263b49f6e
2 changed files with 37 additions and 0 deletions
  1. +22
    -0
      src/Controller/Admin/DashboardController.php
  2. +15
    -0
      src/Controller/Admin/UserCrudController.php

+ 22
- 0
src/Controller/Admin/DashboardController.php View File

@@ -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 View File

@@ -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;
}

}

Loading…
Cancel
Save