Browse Source

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/CaracoleSkeleton into develop

master
Fab 3 years ago
parent
commit
786e0269c6
5 changed files with 50 additions and 26 deletions
  1. +1
    -1
      config/packages/lc_sov.yaml
  2. +3
    -1
      config/packages/security.yaml
  3. +16
    -18
      config/routes.yaml
  4. +14
    -0
      config/services.yaml
  5. +16
    -6
      src/Controller/Admin/DashboardController.php

+ 1
- 1
config/packages/lc_sov.yaml View File

# see https://symfony.com/doc/current/reference/configuration/framework.html # see https://symfony.com/doc/current/reference/configuration/framework.html
lc_sov: lc_sov:
homepage_route: '_homepage'
homepage_route: 'home'

+ 3
- 1
config/packages/security.yaml View File

dev: dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/ pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false security: false

main: main:
pattern: ^/
anonymous: true anonymous: true
lazy: true lazy: true
provider: app_user_provider provider: app_user_provider
authenticators: authenticators:
- Lc\SovBundle\Authenticator\LoginFormAuthenticator - Lc\SovBundle\Authenticator\LoginFormAuthenticator
logout: logout:
path: logout
path: sov_logout
# where to redirect after logout # where to redirect after logout
# target: app_any_route # target: app_any_route



+ 16
- 18
config/routes.yaml View File



lc_admin_dashboard:
path: /admin
controller: App\Controller\Admin\DashboardController::index
login:
path: /login
controller: Lc\SovBundle\Controller\Admin\SecurityController::login
logout:
path: /logout
controller: Lc\SovBundle\Admin\SecurityController::logout
sov_bundle:
resource: "@LcSovBundle/Resources/config/routes.yaml"
prefix: /


artgris_bundle_file_manager: artgris_bundle_file_manager:
resource: "@ArtgrisFileManagerBundle/Controller"
type: annotation
prefix: /manager
resource: "@ArtgrisFileManagerBundle/Controller"
type: annotation
prefix: /manager


admin_dashboard:
path: /admin
controller: App\Controller\Admin\DashboardController::index


_homepage:
path: /
defaults: { _controller: App\Controller\IndexController::index , _locale: fr}
_page:
path: /page/{pageSlug}
controller: App\Controller\IndexController::page
home:
path: /
defaults: { _controller: App\Controller\IndexController::index , _locale: fr}

page:
path: /page/{pageSlug}
controller: App\Controller\IndexController::page

+ 14
- 0
config/services.yaml View File

resource: '../src/Controller/' resource: '../src/Controller/'
tags: ['controller.service_arguments'] tags: ['controller.service_arguments']


Lc\SovBundle\:
resource: '../Lc/SovBundle/'
exclude:
- '../Lc/SovBundle/DependencyInjection/'
- '../Lc/SovBundle/Entity/'
- '../Lc/SovBundle/Kernel.php'
- '../Lc/SovBundle/Tests/'

Lc\SovBundle\Controller\:
resource: '../Lc/SovBundle/Controller/'
tags: [ 'controller.service_arguments' ]


Lc\SovBundle\Controller\Admin\:
resource: '../Lc/SovBundle/Controller/Admin/'
tags: [ 'controller.service_arguments' ]


Lc\CaracoleBundle\: Lc\CaracoleBundle\:
resource: '../Lc/CaracoleBundle/' resource: '../Lc/CaracoleBundle/'

+ 16
- 6
src/Controller/Admin/DashboardController.php View File



public function configureMenuItems(): iterable public function configureMenuItems(): iterable
{ {
$submenuUser = [
MenuItem::linkToCrud('Utilisateurs', '', User::class),
MenuItem::linkToCrud('Groupes d\'utilisateurs', '', GroupUser::class),
];

yield MenuItem::linkToDashboard('Tableau de bord', 'circle'); yield MenuItem::linkToDashboard('Tableau de bord', 'circle');
yield MenuItem::subMenu('Utilisateurs', 'user')->setSubItems($submenuUser);

yield MenuItem::subMenu('Utilisateurs', 'user')->setSubItems(
[
MenuItem::linkToCrud('Utilisateurs', '', User::class),
MenuItem::linkToCrud('Groupes d\'utilisateurs', '', GroupUser::class),
]
);

yield MenuItem::linkToCrud('Pages', 'copy', Page::class); yield MenuItem::linkToCrud('Pages', 'copy', Page::class);
yield MenuItem::linkToCrud('TVA', 'circle', TaxRate::class); yield MenuItem::linkToCrud('TVA', 'circle', TaxRate::class);

yield MenuItem::subMenu('Mon compte', 'user')->setSubItems(
[
MenuItem::linkToRoute('Informations personnelles', '', 'sov_admin_account_profile'),
MenuItem::linkToRoute('Mot de passe', '', 'sov_admin_account_password'),
]
);

/* /*
MenuItem::section('Blog'), MenuItem::section('Blog'),
MenuItem::linkToCrud('Categories', 'fa fa-tags', Category::class), MenuItem::linkToCrud('Categories', 'fa fa-tags', Category::class),

Loading…
Cancel
Save