Commit 456bf8ae authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Nouveau système de form et aide de vue pour les configs de plafonds. à généraliser

parent 6d45eff7
Loading
Loading
Loading
Loading
+7
Changes for code/test6.php: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -7,3 +7,10 @@
 * @var $viewName   string
 * @var $viewFile   string
 */

$class = \Plafond\Entity\Db\PlafondApplication::class;


echo substr($class, strrpos($class, '\\') + 1);

+15 −15
Changes for composer.lock: 15 added lines, 15 removed lines.
Original line number Diff line number Diff line
@@ -546,16 +546,16 @@
        },
        {
            "name": "doctrine/dbal",
            "version": "3.3.x-dev",
            "version": "3.4.x-dev",
            "source": {
                "type": "git",
                "url": "https://github.com/doctrine/dbal.git",
                "reference": "b2ebd20ec1edf60506847b56e2fad873373493b7"
                "reference": "a4b37db6f186b6843474189b424aed6a7cc5de4b"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/doctrine/dbal/zipball/b2ebd20ec1edf60506847b56e2fad873373493b7",
                "reference": "b2ebd20ec1edf60506847b56e2fad873373493b7",
                "url": "https://api.github.com/repos/doctrine/dbal/zipball/a4b37db6f186b6843474189b424aed6a7cc5de4b",
                "reference": "a4b37db6f186b6843474189b424aed6a7cc5de4b",
                "shasum": ""
            },
            "require": {
@@ -570,7 +570,7 @@
            "require-dev": {
                "doctrine/coding-standard": "9.0.0",
                "jetbrains/phpstorm-stubs": "2021.1",
                "phpstan/phpstan": "1.3.0",
                "phpstan/phpstan": "1.4.0",
                "phpstan/phpstan-strict-rules": "^1.1",
                "phpunit/phpunit": "9.5.11",
                "psalm/plugin-phpunit": "0.16.1",
@@ -637,7 +637,7 @@
            ],
            "support": {
                "issues": "https://github.com/doctrine/dbal/issues",
                "source": "https://github.com/doctrine/dbal/tree/3.3.x"
                "source": "https://github.com/doctrine/dbal/tree/3.3.0"
            },
            "funding": [
                {
@@ -653,7 +653,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2022-01-12T21:41:05+00:00"
            "time": "2022-01-18T00:13:52+00:00"
        },
        {
            "name": "doctrine/deprecations",
@@ -5782,12 +5782,12 @@
            "source": {
                "type": "git",
                "url": "https://github.com/symfony/console.git",
                "reference": "b21b53c562dc335a5d59094c0e640c3b46a1896c"
                "reference": "e03d6997073668bc8802a5cca5d0df2e93b033da"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/symfony/console/zipball/b21b53c562dc335a5d59094c0e640c3b46a1896c",
                "reference": "b21b53c562dc335a5d59094c0e640c3b46a1896c",
                "url": "https://api.github.com/repos/symfony/console/zipball/e03d6997073668bc8802a5cca5d0df2e93b033da",
                "reference": "e03d6997073668bc8802a5cca5d0df2e93b033da",
                "shasum": ""
            },
            "require": {
@@ -5869,7 +5869,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2021-12-27T21:05:40+00:00"
            "time": "2022-01-17T10:57:14+00:00"
        },
        {
            "name": "symfony/deprecation-contracts",
@@ -6768,12 +6768,12 @@
            "source": {
                "type": "git",
                "url": "https://github.com/symfony/var-dumper.git",
                "reference": "f8d30f4440dd702eed1a028caaffaae1ebaeee37"
                "reference": "89d8bba08e70ef0f57ba589309fd2df9df2a606c"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/f8d30f4440dd702eed1a028caaffaae1ebaeee37",
                "reference": "f8d30f4440dd702eed1a028caaffaae1ebaeee37",
                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/89d8bba08e70ef0f57ba589309fd2df9df2a606c",
                "reference": "89d8bba08e70ef0f57ba589309fd2df9df2a606c",
                "shasum": ""
            },
            "require": {
@@ -6848,7 +6848,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2021-12-29T10:14:20+00:00"
            "time": "2022-01-17T16:30:50+00:00"
        },
        {
            "name": "unicaen/app",
+4 −3
Changes for data/privileges.php: 4 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -394,9 +394,10 @@ return [
        'privileges' => [
            'visualisation'             => 'Visualisation',
            'edition'                   => 'Édition',
            'application'               => 'Application',
            'structure-visualisation'   => 'Par structure (visualisation)',
            'structure-edition'         => 'Par structure (édition)',
            'config-application'        => 'Application',
            'config-structure'          => 'Configuration par composante',
            'config-referentiel'        => 'Configuration par fonction référentielle',
            'config-statut'             => 'Configuration par statut d\'intervenant',
            'derogations-visualisation' => 'Dérogations (visualisation)',
            'derogations-edition'       => 'Dérogations (édition)',
        ],
+4 −3
Changes for module/Application/src/Provider/Privilege/Privileges.php: 4 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -201,12 +201,13 @@ class Privileges extends \UnicaenAuth\Provider\Privilege\Privileges {
    const PIECE_JUSTIFICATIVE_VISUALISATION                   = 'piece-justificative-visualisation';
    const PILOTAGE_ECARTS_ETATS                               = 'pilotage-ecarts-etats';
    const PILOTAGE_VISUALISATION                              = 'pilotage-visualisation';
    const PLAFONDS_APPLICATION                                = 'plafonds-application';
    const PLAFONDS_CONFIG_APPLICATION                         = 'plafonds-config-application';
    const PLAFONDS_CONFIG_REFERENTIEL                         = 'plafonds-config-referentiel';
    const PLAFONDS_CONFIG_STATUT                              = 'plafonds-config-statut';
    const PLAFONDS_CONFIG_STRUCTURE                           = 'plafonds-config-structure';
    const PLAFONDS_DEROGATIONS_EDITION                        = 'plafonds-derogations-edition';
    const PLAFONDS_DEROGATIONS_VISUALISATION                  = 'plafonds-derogations-visualisation';
    const PLAFONDS_EDITION                                    = 'plafonds-edition';
    const PLAFONDS_STRUCTURE_EDITION                          = 'plafonds-structure-edition';
    const PLAFONDS_STRUCTURE_VISUALISATION                    = 'plafonds-structure-visualisation';
    const PLAFONDS_VISUALISATION                              = 'plafonds-visualisation';
    const REFERENTIEL_ADMIN_EDITION                           = 'referentiel-admin-edition';
    const REFERENTIEL_ADMIN_VISUALISATION                     = 'referentiel-admin-visualisation';
+45 −14
Changes for module/Plafond/config/module.config.php: 45 added lines, 14 removed lines.
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
namespace Plafond;

use Application\Provider\Privilege\Privileges;
use Plafond\View\Helper\PlafondConfigElementViewHelperFactory;
use UnicaenAuth\Assertion\AssertionFactory;
use UnicaenAuth\Guard\PrivilegeController;

@@ -34,9 +35,24 @@ return [
                    ],
                ],

                'editer-application' => [
                    'route'  => '/editer-application',
                    'action' => 'editerApplication',
                'config-application' => [
                    'route'  => '/config/application',
                    'action' => 'config-application',
                ],

                'config-structure' => [
                    'route'  => '/config/structure',
                    'action' => 'config-structure',
                ],

                'config-statut' => [
                    'route'  => '/config/statut',
                    'action' => 'config-statut',
                ],

                'config-referentiel' => [
                    'route'  => '/config/referentiel',
                    'action' => 'config-referentiel',
                ],

                'construire-calculer' => [
@@ -118,19 +134,31 @@ return [
        ],
        [
            'controller' => 'Plafond\Controller\Plafond',
            'action'     => ['editerApplication'],
            'privileges' => Privileges::PLAFONDS_APPLICATION,
            'action'     => ['config-application'],
            'privileges' => Privileges::PLAFONDS_CONFIG_APPLICATION,
        ],
        [
            'controller' => 'Plafond\Controller\PlafondStructure',
            'action'     => ['index'],
            'privileges' => Privileges::PLAFONDS_STRUCTURE_VISUALISATION,
            'controller' => 'Plafond\Controller\Plafond',
            'action'     => ['config-structure'],
            'privileges' => Privileges::PLAFONDS_CONFIG_STRUCTURE,
            'assertion'  => Assertion\PlafondAssertion::class,
        ],
        [
            'controller' => 'Plafond\Controller\Plafond',
            'action'     => ['config-statut'],
            'privileges' => Privileges::PLAFONDS_CONFIG_STATUT,
            'assertion'  => Assertion\PlafondAssertion::class,
        ],
        [
            'controller' => 'Plafond\Controller\Plafond',
            'action'     => ['config-referentiel'],
            'privileges' => Privileges::PLAFONDS_CONFIG_REFERENTIEL,
            'assertion'  => Assertion\PlafondAssertion::class,
        ],
        [
            'controller' => 'Plafond\Controller\PlafondStructure',
            'action'     => ['editer'],
            'privileges' => Privileges::PLAFONDS_STRUCTURE_EDITION,
            'action'     => ['index'],
            'privileges' => Privileges::STRUCTURES_ADMINISTRATION_VISUALISATION,
            'assertion'  => Assertion\PlafondAssertion::class,
        ],
        [
@@ -140,16 +168,15 @@ return [
        ],
    ],

    'rules' => [
    /*    'rules' => [
            [
                'privileges' => [
                Privileges::PLAFONDS_STRUCTURE_VISUALISATION,
                Privileges::PLAFONDS_STRUCTURE_EDITION,

                ],
                'resources'  => 'Structure',
                'assertion'  => Assertion\PlafondAssertion::class,
            ],
    ],
        ],*/

    'controllers' => [
        'Plafond\Controller\Plafond'          => Controller\PlafondControllerFactory::class,
@@ -167,4 +194,8 @@ return [
    'forms' => [
        Form\PlafondForm::class => Form\PlafondFormFactory::class,
    ],

    'view_helpers' => [
        'plafondConfig' => PlafondConfigElementViewHelperFactory::class,
    ],
];
 No newline at end of file
Loading