|
|
|
|
|
|
|
|
public function configureDashboard(): Dashboard |
|
|
public function configureDashboard(): Dashboard |
|
|
{ |
|
|
{ |
|
|
return Dashboard::new() |
|
|
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 |
|
|
public function configureAssets(): Assets |
|
|
|
|
|
|
|
|
$assets->addWebpackEncoreEntry('adminlte-index'); |
|
|
$assets->addWebpackEncoreEntry('adminlte-index'); |
|
|
$assets->addWebpackEncoreEntry('adminlte-form'); |
|
|
$assets->addWebpackEncoreEntry('adminlte-form'); |
|
|
$assets->addWebpackEncoreEntry('adminlte-sort'); |
|
|
$assets->addWebpackEncoreEntry('adminlte-sort'); |
|
|
|
|
|
$assets->addWebpackEncoreEntry('adminlte-field-collection'); |
|
|
|
|
|
$assets->addWebpackEncoreEntry('adminlte-field-filemanager'); |
|
|
|
|
|
|
|
|
return $assets; |
|
|
return $assets; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// user menu with some menu items already created ("sign out", "exit impersonation", etc.) |
|
|
// 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()->... |
|
|
// if you prefer to create the user menu from scratch, use: return UserMenu::new()->... |
|
|
return parent::configureUserMenu($user) |
|
|
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 |
|
|
public function configureCrud(): Crud |
|
|
|
|
|
|
|
|
$crud = Crud::new(); |
|
|
$crud = Crud::new(); |
|
|
|
|
|
|
|
|
return $crud |
|
|
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' |
|
|
|
|
|
] |
|
|
|
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |