Commit aa207d86 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Suppression de code inutilisé

parent 9d6ace19
Loading
Loading
Loading
Loading
+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
@@ -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'       => [
+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
@@ -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;
@@ -36,8 +37,6 @@ class RoleController extends AbstractController {
        $request = $this->getRequest();
        $form = $this->getRoleForm();



        $viewModel = new ViewModel([
            'form' => $form,
        ]);
@@ -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