浏览代码

Intégration easyadmin

master
Fab 3 年前
父节点
当前提交
2263b49f6e
共有 2 个文件被更改,包括 37 次插入0 次删除
  1. +22
    -0
      src/Controller/Admin/DashboardController.php
  2. +15
    -0
      src/Controller/Admin/UserCrudController.php

+ 22
- 0
src/Controller/Admin/DashboardController.php 查看文件

@@ -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 查看文件

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

}

正在加载...
取消
保存