|
|
@@ -23,14 +23,14 @@ class DashboardController extends AbstractDashboardController |
|
|
|
public function configureDashboard(): Dashboard |
|
|
|
{ |
|
|
|
return Dashboard::new() |
|
|
|
// the name visible to end users |
|
|
|
->setTitle('LA CLIC !') |
|
|
|
// you can include HTML contents too (e.g. to link to an image) |
|
|
|
->setTitle('<img src="assets/img/laclic.png" width="100px">') |
|
|
|
// the path defined in this method is passed to the Twig asset() function |
|
|
|
->setFaviconPath('favicon.svg') |
|
|
|
// the domain used by default is 'messages' |
|
|
|
->setTranslationDomain('admin'); |
|
|
|
// the name visible to end users |
|
|
|
->setTitle('LA CLIC !') |
|
|
|
// you can include HTML contents too (e.g. to link to an image) |
|
|
|
->setTitle('<img src="assets/img/laclic.png" width="100px">') |
|
|
|
// the path defined in this method is passed to the Twig asset() function |
|
|
|
->setFaviconPath('favicon.svg') |
|
|
|
// the domain used by default is 'messages' |
|
|
|
->setTranslationDomain('admin'); |
|
|
|
} |
|
|
|
|
|
|
|
public function configureAssets(): Assets |
|
|
@@ -41,6 +41,8 @@ class DashboardController extends AbstractDashboardController |
|
|
|
$assets->addWebpackEncoreEntry('adminlte-index'); |
|
|
|
$assets->addWebpackEncoreEntry('adminlte-form'); |
|
|
|
$assets->addWebpackEncoreEntry('adminlte-sort'); |
|
|
|
$assets->addWebpackEncoreEntry('adminlte-field-collection'); |
|
|
|
$assets->addWebpackEncoreEntry('adminlte-field-filemanager'); |
|
|
|
|
|
|
|
return $assets; |
|
|
|
} |
|
|
@@ -51,22 +53,22 @@ class DashboardController extends AbstractDashboardController |
|
|
|
// user menu with some menu items already created ("sign out", "exit impersonation", etc.) |
|
|
|
// if you prefer to create the user menu from scratch, use: return UserMenu::new()->... |
|
|
|
return parent::configureUserMenu($user) |
|
|
|
// use the given $user object to get the user name |
|
|
|
->setName($user->getName()) |
|
|
|
// use this method if you don't want to display the name of the user |
|
|
|
//->displayUserName(false) |
|
|
|
->displayUserAvatar(false) |
|
|
|
// you can also pass an email address to use gravatar's service |
|
|
|
->setGravatarEmail($user->getEmail()) |
|
|
|
// use the given $user object to get the user name |
|
|
|
->setName($user->getName()) |
|
|
|
// use this method if you don't want to display the name of the user |
|
|
|
//->displayUserName(false) |
|
|
|
->displayUserAvatar(false) |
|
|
|
// you can also pass an email address to use gravatar's service |
|
|
|
->setGravatarEmail($user->getEmail()) |
|
|
|
|
|
|
|
// you can use any type of menu item, except submenus |
|
|
|
->setMenuItems( |
|
|
|
[ |
|
|
|
//MenuItem::linkToRoute('My Profile', 'fa fa-id-card', '', ['...' => '...']), |
|
|
|
MenuItem::linkToLogout('Déconnexion', 'sign-out-alt'), |
|
|
|
//MenuItem::linkToLogout('Déconnexion', 'sign-out-alt') |
|
|
|
] |
|
|
|
); |
|
|
|
// you can use any type of menu item, except submenus |
|
|
|
->setMenuItems( |
|
|
|
[ |
|
|
|
//MenuItem::linkToRoute('My Profile', 'fa fa-id-card', '', ['...' => '...']), |
|
|
|
MenuItem::linkToLogout('Déconnexion', 'sign-out-alt'), |
|
|
|
//MenuItem::linkToLogout('Déconnexion', 'sign-out-alt') |
|
|
|
] |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
public function configureCrud(): Crud |
|
|
@@ -74,24 +76,23 @@ class DashboardController extends AbstractDashboardController |
|
|
|
$crud = Crud::new(); |
|
|
|
|
|
|
|
return $crud |
|
|
|
->overrideTemplates( |
|
|
|
[ |
|
|
|
'layout' => '@LcSov/adminlte/layout.html.twig', |
|
|
|
'main_menu' => '@LcSov/adminlte/block/menu.html.twig', |
|
|
|
'crud/index' => '@LcSov/adminlte/crud/index.html.twig', |
|
|
|
'crud/paginator' => '@LcSov/adminlte/crud/paginator.html.twig', |
|
|
|
'crud/edit' => '@LcSov/adminlte/crud/edit.html.twig', |
|
|
|
'crud/new' => '@LcSov/adminlte/crud/new.html.twig', |
|
|
|
'flash_messages' => '@LcSov/adminlte/block/flash_messages.html.twig', |
|
|
|
] |
|
|
|
) |
|
|
|
->setFormThemes( |
|
|
|
[ |
|
|
|
'@LcSov/adminlte/crud/form_theme.html.twig', |
|
|
|
'@FOSCKEditor/Form/ckeditor_widget.html.twig' |
|
|
|
] |
|
|
|
) |
|
|
|
; |
|
|
|
->overrideTemplates( |
|
|
|
[ |
|
|
|
'layout' => '@LcSov/adminlte/layout.html.twig', |
|
|
|
'main_menu' => '@LcSov/adminlte/block/menu.html.twig', |
|
|
|
'crud/index' => '@LcSov/adminlte/crud/index.html.twig', |
|
|
|
'crud/paginator' => '@LcSov/adminlte/crud/paginator.html.twig', |
|
|
|
'crud/edit' => '@LcSov/adminlte/crud/edit.html.twig', |
|
|
|
'crud/new' => '@LcSov/adminlte/crud/new.html.twig', |
|
|
|
'flash_messages' => '@LcSov/adminlte/block/flash_messages.html.twig', |
|
|
|
] |
|
|
|
) |
|
|
|
->setFormThemes( |
|
|
|
[ |
|
|
|
'@LcSov/adminlte/crud/form_theme.html.twig', |
|
|
|
'@FOSCKEditor/Form/ckeditor_widget.html.twig' |
|
|
|
] |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
} |