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

Ajout du module 'AUTOFORM'

parent 8266be24
Loading
Loading
Loading
Loading
+1
Changes for config/application.config.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ $modules = [
    'ZfcBase', 'DoctrineModule', 'DoctrineORMModule', 'ZfcUser', 'ZfcUserDoctrineORM',
    'BjyAuthorize', 'AssetManager',
    'UnicaenApp', 'UnicaenAuth', 'UnicaenLdap',
    'Autoform',
    'Mailing',
    'Octopus',
    'Application',
+10 −10
Changes for module/Application/config/merged/utilisateur.config.php: 10 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -141,16 +141,16 @@ return [
            UserService::class => UserServiceFactory::class,
        ],
    ],
    'translator'      => [
        'locale'                    => 'fr_FR', // en_US
        'translation_file_patterns' => [
            [
                'type'     => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern'  => '%s.mo',
            ],
        ],
    ],
//    'translator'      => [
//        'locale'                    => 'fr_FR', // en_US
//        'translation_file_patterns' => [
//            [
//                'type'     => 'gettext',
//                'base_dir' => __DIR__ . '/../language',
//                'pattern'  => '%s.mo',
//            ],
//        ],
//    ],
    'controllers'     => [
        'factories' => [
            UtilisateurController::class => UtilisateurControllerFactory::class,
+4 −1
Changes for module/Application/src/Application/Controller/Agent/AgentController.php: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -122,6 +122,9 @@ class AgentController extends AbstractActionController
        if ($request->isPost()) {
            $data = $request->getPost();
            var_dump($data);
            $individu = $this->getIndividuService()->getIndividu($data['agent']['id']);

            var_dump($individu);
            //$this->redirect()->toRoute('agent/importer');
        }

@@ -142,7 +145,7 @@ class AgentController extends AbstractActionController
                $result[] = array(
                    'id'    => $individu->getCIndividuChaine(),
                    'label' => $individu->getPrenom()." ".$individu->getNomUsage(),
                    'extra' => "<span class='badge' style='background-color: slategray;'>".$individu->getCSource()."</span>",
                    'extra' => ($individu->getCSource())->__toString(),
                );
            }
            usort($result, function($a, $b) {
+x+62
Changes for module/Autoform/Module.php: 62 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

namespace Autoform;

use Zend\Mvc\ModuleRouteListener;
use Zend\Mvc\MvcEvent;
use Zend\Stdlib\ArrayUtils;
use Zend\Stdlib\Glob;
use Zend\Config\Factory as ConfigFactory;

class Module
{
    public function onBootstrap(MvcEvent $e)
    {
        $e->getApplication()->getServiceManager()->get('translator');
        $eventManager        = $e->getApplication()->getEventManager();
        $moduleRouteListener = new ModuleRouteListener();
        $moduleRouteListener->attach($eventManager);

        /* Active un layout spécial si la requête est de type AJAX. Valable pour TOUS les modules de l'application. */
        $eventManager->getSharedManager()->attach('Zend\Mvc\Controller\AbstractActionController', 'dispatch',
            function (MvcEvent $e) {
                $request = $e->getRequest();
                if ($request->isXmlHttpRequest()) {
                    $e->getTarget()->layout('layout/ajax.phtml');
                }
            }
        );
    }

    public function getConfig()
    {
        $configInit = [
            __DIR__ . '/config/module.config.php'
        ];
        $configFiles = ArrayUtils::merge(
            $configInit,
            Glob::glob(__DIR__ . '/config/merged/{,*.}{config}.php', Glob::GLOB_BRACE)
        );

        return ConfigFactory::fromFiles($configFiles);
    }


    public function getAutoloaderConfig()
    {
        return array(
            'Zend\Loader\StandardAutoloader' => array(
                'namespaces' => array(
                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
                ),
            ),
        );
    }
}
+55
Changes for module/Autoform/config/merged/champ.config.php: 55 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Autoform;

use Autoform\Form\Champ\ChampForm;
use Autoform\Form\Champ\ChampFormFactory;
use Autoform\Form\Champ\ChampHydrator;
use Autoform\Form\Champ\ChampHydratorFactory;
use Autoform\Service\Champ\ChampService;
use Autoform\Service\Champ\ChampServiceFactory;
use Autoform\View\Helper\ChampAsInputHelper;
use Autoform\View\Helper\ChampAsResultHelper;
use Autoform\View\Helper\ChampAsValidationHelper;
use UnicaenAuth\Guard\PrivilegeController;

return [
    'bjyauthorize' => [
        'guards' => [
            PrivilegeController::class => [],
        ],
    ],

    'router' => [
        'routes' => [
        ],
    ],

    'service_manager' => [
        'factories' => [
            ChampService::class => ChampServiceFactory::class,
        ],
    ],
    'controllers'     => [
        'factories' => [],
    ],
    'form_elements' => [
        'factories' => [
            ChampForm::class => ChampFormFactory::class,
        ],
    ],
    'hydrators' => [
        'factories' => [
            ChampHydrator::class => ChampHydratorFactory::class,
        ],
    ],

    'view_helpers' => [
        'invokables' => [
            'champAsResult'              => ChampAsResultHelper::class,
            'champAsInput'               => ChampAsInputHelper::class,
            'champAsValidation'          => ChampAsValidationHelper::class,
        ],
    ],

];
 No newline at end of file
Loading