Quellcode durchsuchen

Intégration easyadmin

master
Fab vor 3 Jahren
Ursprung
Commit
2263b49f6e
2 geänderte Dateien mit 37 neuen und 0 gelöschten Zeilen
  1. +22
    -0
      src/Controller/Admin/DashboardController.php
  2. +15
    -0
      src/Controller/Admin/UserCrudController.php

+ 22
- 0
src/Controller/Admin/DashboardController.php Datei anzeigen

@@ -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 Datei anzeigen

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

}

Laden…
Abbrechen
Speichern