Commit 11aab11c authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Renommage du controlleur

parent 9665d07b
Loading
Loading
Loading
Loading
+8 −11
Changes for module/Application/config/others/admin.config.php: 8 added lines, 11 removed lines.
Original line number Diff line number Diff line
<?php

use Application\Controller\AdminController;
use Application\Controller\Factory\RoleControllerFactory;
use Application\Controller\Factory\PrivilegeControllerFactory;
use Application\Controller\MailConfirmationController;
use Application\Provider\Privilege\UtilisateurPrivileges;
use UnicaenAuth\Guard\PrivilegeController;
@@ -26,7 +26,7 @@ return [
                    'privileges' => UtilisateurPrivileges::UTILISATEUR_ATTRIBUTION_ROLE,
                ],
                [
                    'controller' => 'Application\Controller\Role',
                    'controller' => \Application\Controller\PrivilegeController::class,
                    'action'     => [
                        'index',
                    ],
@@ -36,7 +36,7 @@ return [
                    ],
                ],
                [
                    'controller' => 'Application\Controller\Role',
                    'controller' => \Application\Controller\PrivilegeController::class,
                    'action'     => [
                        'modifier',
                    ],
@@ -86,13 +86,12 @@ return [
                    ],
                ],
            ],
            'roles' => [
            'gestion-privilege' => [
                'type'          => Literal::class,
                'options'       => [
                    'route'    => '/roles',
                    'route'    => '/gestion-privilege',
                    'defaults' => [
                        '__NAMESPACE__' => 'Application\Controller',
                        'controller'    => 'Role',
                        'controller'    => \Application\Controller\PrivilegeController::class,
                        'action'        => 'index',
                    ],
                ],
@@ -153,8 +152,7 @@ return [
                'options'       => [
                    'route'    => '/modifier-privilege/:role/:privilege',
                    'defaults' => [
                        '__NAMESPACE__' => 'Application\Controller',
                        'controller'    => 'Role',
                        'controller'    => \Application\Controller\PrivilegeController::class,
                        'action'        => 'modifier',
                    ],
                ],
@@ -208,9 +206,8 @@ return [

        ],
        'factories' => [
            'Application\Controller\Role' => RoleControllerFactory::class,
            \Application\Controller\PrivilegeController::class =>  \Application\Controller\Factory\PrivilegeControllerFactory::class,
            MailConfirmationController::class => MailConfirmationControllerFactory::class,

        ],
    ],

+1 −1
Changes for module/Application/config/others/droits.config.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ return [
                            'privileges' => [
                                'label'      => "Privilèges",
                                'title'      => "Gestion des privilèges",
                                'route'      => 'roles',
                                'route'      => 'gestion-privilege',
                                'resource'   => PrivilegeController::getResourceId('UnicaenAuth\Controller\Droits', 'privileges'),
                                'withtarget' => true,
                            ],
+3 −3
Changes for module/Application/src/Application/Controller/Factory/PrivilegeControllerFactory.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

namespace Application\Controller\Factory;

use Application\Controller\RoleController;
use Application\Controller\PrivilegeController;
use Application\Service\Etablissement\EtablissementService;
use Application\Service\Role\RoleService;
use Application\Service\Structure\StructureService;
@@ -10,7 +10,7 @@ use Doctrine\ORM\EntityManager;
use Zend\Mvc\Controller\ControllerManager;


class RoleControllerFactory
class PrivilegeControllerFactory
{
    public function __invoke(ControllerManager $controllerManager)
    {
@@ -26,7 +26,7 @@ class RoleControllerFactory
        $etablissementService = $controllerManager->getServiceLocator()->get('EtablissementService');
        $structureService = $controllerManager->getServiceLocator()->get('StructureService');

        $controller = new RoleController();
        $controller = new PrivilegeController();
        $controller->setEntityManager($entityManager);
        $controller->setRoleService($roleService);
        $controller->setEtablissementService($etablissementService);
+1 −1
Changes for module/Application/src/Application/Controller/PrivilegeController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ use UnicaenApp\Service\EntityManagerAwareTrait;
use UnicaenAuth\Entity\Db\CategoriePrivilege;
use Zend\View\Model\ViewModel;

class RoleController extends AbstractController
class PrivilegeController extends AbstractController
{
    use EntityManagerAwareTrait;
    use RoleServiceAwareTrait;
Loading