Loading module/Application/config/others/admin.config.php +0 −33 Changes for module/Application/config/others/admin.config.php: 0 added lines, 33 removed lines. Original line number Diff line number Diff line Loading @@ -131,39 +131,6 @@ return [ ], ], ], 'role-ordre' => [ 'type' => Literal::class, 'options' => [ 'route' => '/role-ordre', 'defaults' => [ 'controller' => RoleController::class, 'action' => 'index', ], ], 'may_terminate' => true, 'child_routes' => [ 'incrementer' => [ 'type' => Segment::class, 'options' => [ 'route' => '/incrementer/:role', 'defaults' => [ 'controller' => RoleController::class, 'action' => 'incrementer-ordre', ], ], ], 'decrementer' => [ 'type' => Segment::class, 'options' => [ 'route' => '/decrementer/:role', 'defaults' => [ 'controller' => RoleController::class, 'action' => 'decrementer-ordre', ], ], ], ] ], 'modifier-privilege' => [ 'type' => Segment::class, 'options' => [ Loading module/Application/src/Application/Controller/RoleController.php +3 −23 Changes for module/Application/src/Application/Controller/RoleController.php: 3 added lines, 23 removed lines. Original line number Diff line number Diff line Loading @@ -4,12 +4,13 @@ namespace Application\Controller; use Application\Entity\Db\Role; use Application\Form\RoleFormAwareTrait; use Structure\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\Role\RoleServiceAwareTrait; use Laminas\View\Model\ViewModel; use Structure\Service\Etablissement\EtablissementServiceAwareTrait; use UnicaenDbImport\Entity\Db\Traits\SourceAwareTrait; class RoleController extends AbstractController { class RoleController extends AbstractController { use RoleServiceAwareTrait; use EtablissementServiceAwareTrait; use RoleFormAwareTrait; Loading @@ -36,8 +37,6 @@ class RoleController extends AbstractController { $request = $this->getRequest(); $form = $this->getRoleForm(); $viewModel = new ViewModel([ 'form' => $form, ]); Loading @@ -59,27 +58,8 @@ class RoleController extends AbstractController { $role->setSource($this->source); $role->setSourceCode(uniqid()); // $this->theseService->saveThese($these); $this->flashMessenger()->addSuccessMessage("Rôle créé avec succès."); // return $this->redirect()->toRoute('these/identite', ['these' => $these->getId()], [], true); return null; } // public function incrementerOrdreAction() { // $idRole = $this->params()->fromRoute('role'); // $role = $this->getRoleService()->getRepository()->find($idRole); // $this->getRoleService()->incrementerOrdre($role); // // $this->redirect()->toRoute('role-ordre'); // } // // public function decrementerOrdreAction() { // $idRole = $this->params()->fromRoute('role'); // $role = $this->getRoleService()->getRepository()->find($idRole); // $this->getRoleService()->decrementerOrdre($role); // // $this->redirect()->toRoute('role-ordre'); // } } No newline at end of file Loading
module/Application/config/others/admin.config.php +0 −33 Changes for module/Application/config/others/admin.config.php: 0 added lines, 33 removed lines. Original line number Diff line number Diff line Loading @@ -131,39 +131,6 @@ return [ ], ], ], 'role-ordre' => [ 'type' => Literal::class, 'options' => [ 'route' => '/role-ordre', 'defaults' => [ 'controller' => RoleController::class, 'action' => 'index', ], ], 'may_terminate' => true, 'child_routes' => [ 'incrementer' => [ 'type' => Segment::class, 'options' => [ 'route' => '/incrementer/:role', 'defaults' => [ 'controller' => RoleController::class, 'action' => 'incrementer-ordre', ], ], ], 'decrementer' => [ 'type' => Segment::class, 'options' => [ 'route' => '/decrementer/:role', 'defaults' => [ 'controller' => RoleController::class, 'action' => 'decrementer-ordre', ], ], ], ] ], 'modifier-privilege' => [ 'type' => Segment::class, 'options' => [ Loading
module/Application/src/Application/Controller/RoleController.php +3 −23 Changes for module/Application/src/Application/Controller/RoleController.php: 3 added lines, 23 removed lines. Original line number Diff line number Diff line Loading @@ -4,12 +4,13 @@ namespace Application\Controller; use Application\Entity\Db\Role; use Application\Form\RoleFormAwareTrait; use Structure\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\Role\RoleServiceAwareTrait; use Laminas\View\Model\ViewModel; use Structure\Service\Etablissement\EtablissementServiceAwareTrait; use UnicaenDbImport\Entity\Db\Traits\SourceAwareTrait; class RoleController extends AbstractController { class RoleController extends AbstractController { use RoleServiceAwareTrait; use EtablissementServiceAwareTrait; use RoleFormAwareTrait; Loading @@ -36,8 +37,6 @@ class RoleController extends AbstractController { $request = $this->getRequest(); $form = $this->getRoleForm(); $viewModel = new ViewModel([ 'form' => $form, ]); Loading @@ -59,27 +58,8 @@ class RoleController extends AbstractController { $role->setSource($this->source); $role->setSourceCode(uniqid()); // $this->theseService->saveThese($these); $this->flashMessenger()->addSuccessMessage("Rôle créé avec succès."); // return $this->redirect()->toRoute('these/identite', ['these' => $these->getId()], [], true); return null; } // public function incrementerOrdreAction() { // $idRole = $this->params()->fromRoute('role'); // $role = $this->getRoleService()->getRepository()->find($idRole); // $this->getRoleService()->incrementerOrdre($role); // // $this->redirect()->toRoute('role-ordre'); // } // // public function decrementerOrdreAction() { // $idRole = $this->params()->fromRoute('role'); // $role = $this->getRoleService()->getRepository()->find($idRole); // $this->getRoleService()->decrementerOrdre($role); // // $this->redirect()->toRoute('role-ordre'); // } } No newline at end of file