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

Déplacement vers le module Information

parent 47c7a110
Loading
Loading
Loading
Loading
+0 −4
Changes for module/Application/config/module.config.php: 0 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -251,10 +251,6 @@ return array(
            '061_uploader' => "/js/jquery.iframe-transport.js",
            '062_uploader' => "/js/jquery.fileupload.js",
            '063_uploader' => "/js/unicaen.uploader.widget.js",
            '100_' => 'js/tinymce/js/tinymce/tinymce.js',
            '101_' => 'js/form_fiche.js',
        ],
        'inline_scripts'        => [
        ],
        'stylesheets'           => [
            '050_bootstrap-theme' => false,
+0 −138
Changes for module/Application/config/others/information.config.php: 0 added lines, 138 removed lines.
Original line number Diff line number Diff line
<?php

use Application\Controller\Factory\InformationControllerFactory;
use Application\Controller\InformationController;
use Application\Form\Factory\InformationFormFactory;
use Application\Form\Hydrator\InformationHydrator;
use Application\Form\InformationForm;
use Application\Service\Information\InformationService;
use Application\Service\Information\InformationServiceFactory;
use UnicaenAuth\Guard\PrivilegeController;
use Zend\Mvc\Router\Http\Literal;
use Zend\Mvc\Router\Http\Segment;

return [
    'bjyauthorize'    => [
        'guards' => [
            PrivilegeController::class => [
                [
                    'controller' => InformationController::class,
                    'action'     => [
                        'index',
                    ],
//                    'privileges' => [
//                        StructurePrivileges::STRUCTURE_CONSULTATION_TOUTES_STRUCTURES,
//                        StructurePrivileges::STRUCTURE_CONSULTATION_SES_STRUCTURES,
//                    ],
                ],
                [
                    'controller' => InformationController::class,
                    'action'     => [
                        'ajouter',
                        'supprimer',
                    ],
//                    'privileges' => [
//                        StructurePrivileges::STRUCTURE_MODIFICATION_TOUTES_STRUCTURES,
//                        StructurePrivileges::STRUCTURE_MODIFICATION_SES_STRUCTURES,
//                        StructurePrivileges::STRUCTURE_CREATION_ED,
//                    ],
                ],
                [
                    'controller' => InformationController::class,
                    'action'     => [
                        'modifier',
                    ],
//                    'privileges' => [
//                        StructurePrivileges::STRUCTURE_MODIFICATION_TOUTES_STRUCTURES,
//                        StructurePrivileges::STRUCTURE_MODIFICATION_SES_STRUCTURES,
//                    ],
                ],
                [
                    'controller' => InformationController::class,
                    'action'     => [
                        'afficher',
                    ],
                    'roles' => [],
                ],
            ],
        ],
    ],
    'router'          => [
        'routes' => [
            'informations' => [
                'type'          => Literal::class,
                'options'       => [
                    'route'    => '/informations',
                    'defaults' => [
                        'controller'    => InformationController::class,
                        'action'        => 'index',
                    ],
                ],
                'may_terminate' => true,
                'child_routes'  => [
                    'afficher' => [
                        'type'          => Segment::class,
                        'options'       => [
                            'route'       => '/afficher/:id',
                            'defaults'    => [
                                'action' => 'afficher',
                            ],
                        ],
                    ],
                    'ajouter' => [
                        'type'          => Literal::class,
                        'options'       => [
                            'route'       => '/ajouter',
                            'defaults'    => [
                                'action' => 'ajouter',
                            ],
                        ],
                    ],
                    'supprimer' => [
                        'type'          => Segment::class,
                        'options'       => [
                            'route'       => '/supprimer/:id',
                            'defaults'    => [
                                'action' => 'supprimer',
                            ],
                        ],
                    ],
                    'modifier' => [
                        'type'          => Segment::class,
                        'options'       => [
                            'route'       => '/modifier/:id',
                            'defaults'    => [
                                'action' => 'modifier',
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],

    'service_manager' => [
        'factories' => [
            InformationService::class => InformationServiceFactory::class
        ],
    ],
    'controllers'     => [
        'factories' => [
            InformationController::class => InformationControllerFactory::class
        ],
    ],
    'form_elements'   => [
        'factories' => [
            InformationForm::class => InformationFormFactory::class,
        ],
    ],
    'hydrators' => [
        'invokables' => [
            InformationHydrator::class => InformationHydrator::class
        ]
    ],
    'view_helpers' => [
        'invokables' => [
        ],
    ],
];
+158 −1
Changes for module/Information/config/module.config.php: 158 added lines, 1 removed line.
Original line number Diff line number Diff line
<?php

use Application\Entity\Db\Repository\DefaultEntityRepository;
use Information\Controller\IndexController;
use Information\Controller\IndexControllerFactory;
use Information\Controller\InformationController;
use Information\Controller\InformationControllerFactory;
use Information\Form\InformationForm;
use Information\Form\InformationFormFactory;
use Information\Form\InformationHydrator;
use Information\Service\InformationService;
use Information\Service\InformationServiceFactory;
use Zend\Mvc\Router\Http\Literal;
use Zend\Mvc\Router\Http\Segment;
use Zend\Navigation\Service\NavigationAbstractServiceFactory;
use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain;
use Doctrine\DBAL\Driver\OCI8\Driver as OCI8;
use Doctrine\ORM\Mapping\Driver\XmlDriver;

return [
    'doctrine'     => [
        /**
         * Génération du mapping à partir de la bdd, exemple :
         *   $ vendor/bin/doctrine-module orm:convert-mapping --namespace="Application\\Entity\\Db\\" --filter="Version" --from-database xml module/Application/src/Application/Entity/Db/Mapping
         *
         * Génération des classes d'entité, exemple :
         *   $ vendor/bin/doctrine-module orm:generate:entities --filter="Version" module/Application/src
         */
        'driver'     => [
            'orm_default'        => [
                'class'   => MappingDriverChain::class,
                'drivers' => [
                    'Information\Entity\Db' => 'orm_default_xml_driver',
                    'Information\Entity\Db\VSitu' => 'orm_default_xml_driver',
                ],
            ],
            'orm_default_xml_driver' => [
                'class' => XmlDriver::class,
                'cache' => 'array',
                'paths' => [
                    __DIR__ . '/../src/Information/Entity/Db/Mapping',
                ],
            ],
        ],
        'eventmanager'  => [
            'orm_default' => [
                'subscribers' => [
                    'UnicaenApp\HistoriqueListener',
                ],
            ],
        ],
        'connection'    => [
            'orm_default' => [
                'driver_class' => OCI8::class,
            ],
        ],
        'configuration' => [
            'orm_default' => [
                'default_repository_class_name' => DefaultEntityRepository::class,
            ]
        ],
        'cache' => [
            'memcached' => [
                'namespace' => 'Sygal_Doctrine',
                'instance'  => 'Sygal\Memcached',
            ],
        ],
    ],

    'bjyauthorize'    => [
        'guards' => [
            \UnicaenAuth\Guard\PrivilegeController::class => [
@@ -12,6 +74,32 @@ return [
                    'controller' => IndexController::class,
                    'roles' => [],
                ],
                [
                    'controller' => InformationController::class,
                    'action'     => [
                        'index',
                    ],
                ],
                [
                    'controller' => InformationController::class,
                    'action'     => [
                        'ajouter',
                        'supprimer',
                    ],
                ],
                [
                    'controller' => InformationController::class,
                    'action'     => [
                        'modifier',
                    ],
                ],
                [
                    'controller' => InformationController::class,
                    'action'     => [
                        'afficher',
                    ],
                    'roles' => [],
                ],
            ],
        ],
    ],
@@ -56,6 +144,55 @@ return [
                    ],
                ],
            ],
            'informations' => [
                'type'          => Literal::class,
                'options'       => [
                    'route'    => '/informations',
                    'defaults' => [
                        'controller'    => InformationController::class,
                        'action'        => 'index',
                    ],
                ],
                'may_terminate' => true,
                'child_routes'  => [
                    'afficher' => [
                        'type'          => Segment::class,
                        'options'       => [
                            'route'       => '/afficher/:id',
                            'defaults'    => [
                                'action' => 'afficher',
                            ],
                        ],
                    ],
                    'ajouter' => [
                        'type'          => Literal::class,
                        'options'       => [
                            'route'       => '/ajouter',
                            'defaults'    => [
                                'action' => 'ajouter',
                            ],
                        ],
                    ],
                    'supprimer' => [
                        'type'          => Segment::class,
                        'options'       => [
                            'route'       => '/supprimer/:id',
                            'defaults'    => [
                                'action' => 'supprimer',
                            ],
                        ],
                    ],
                    'modifier' => [
                        'type'          => Segment::class,
                        'options'       => [
                            'route'       => '/modifier/:id',
                            'defaults'    => [
                                'action' => 'modifier',
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
    'navigation'      => [
@@ -87,16 +224,36 @@ return [
        'abstract_factories' => [
            NavigationAbstractServiceFactory::class,
        ],
        'factories' => [
            InformationService::class => InformationServiceFactory::class,
        ],
    ],

    'controllers' => [
        'factories' => [
            IndexController::class => IndexControllerFactory::class
            IndexController::class => IndexControllerFactory::class,
            InformationController::class => InformationControllerFactory::class,
        ],
    ],
    'form_elements'   => [
        'factories' => [
            InformationForm::class => InformationFormFactory::class,
        ],
    ],
    'hydrators' => [
        'invokables' => [
            InformationHydrator::class => InformationHydrator::class
        ]
    ],
    'view_manager' => [
        'template_path_stack' => [
            __DIR__ . '/../view',
        ],
    ],
    'public_files' => [
        'inline_scripts'        => [
            '100_' => 'js/tinymce/js/tinymce/tinymce.js',
            '101_' => 'js/form_fiche.js',
        ],
    ]
];
 No newline at end of file
+4 −4
Changes for module/Information/src/Information/Controller/InformationController.php: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
<?php

namespace Application\Controller;
namespace Information\Controller;

use Application\Entity\Db\Information;
use Application\Form\InformationForm;
use Application\Service\Information\InformationServiceAwareTrait;
use Information\Entity\Db\Information;
use Information\Form\InformationForm;
use Information\Service\InformationServiceAwareTrait;
use Zend\Http\Request;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
+3 −3
Changes for module/Information/src/Information/Controller/InformationControllerFactory.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
<?php

namespace Application\Controller\Factory;
namespace Information\Controller;

use Application\Controller\InformationController;
use Application\Service\Information\InformationService;
use Information\Controller\InformationController;
use Information\Service\InformationService;
use Zend\Mvc\Controller\ControllerManager;

class InformationControllerFactory {
Loading