Commit 3ca33f43 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Modif structure des options globales.

parent 84e74745
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ return [
    ],
    'service_manager' => [
        'factories' => [
            'UnicaenLeocarte\Service'     => PhotoServiceFactory::class,
            'UnicaenLeocarte\Service\Photo' => PhotoServiceFactory::class,
            'UnicaenLeocarte\Options'       => ModuleOptionsFactory::class,
            'UnicaenLeocarte\Soap\Client'   => SoapClientFactory::class,
        ],
+12 −10
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ namespace UnicaenLeocarte;

return [
    'unicaen-leocarte' => [
        'photo_config' => [
            /**
             * Témoin indiquant si le droit d'utilisation de la photo doit être pris en considération ou non.
             */
@@ -16,5 +17,6 @@ return [
                'width'   => 100,
                'height'  => 120,
            ],
        ],
    ]
];
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@

return [
    'unicaen-leocarte' => [
        'leocarte' => [
        'soap_client_config' => [
            'wsdl' => [
                'file'     => __DIR__ . '/../externalEasyIDWebServices.wsdl',
                'username' => 'xxxxx',
+1 −2
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ use UnicaenLeocarte\Service\Photo\PhotoServiceAwareInterface;
use UnicaenLeocarte\Service\Photo\PhotoServiceAwareTrait;
use Zend\Http\PhpEnvironment\Response;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\JsonModel;

class IndexController extends AbstractActionController implements PhotoServiceAwareInterface
{
@@ -17,7 +16,7 @@ class IndexController extends AbstractActionController implements PhotoServiceAw
    /**
     * @var bool Témoin indiquant si le droit d'utilisation de la photo doit être pris en considération ou non.
     */
    protected $checkDroitUtilisationPhoto;
    protected $checkDroitUtilisationPhoto = true;

    /**
     * Récupère la photo d'un étudiant.
+9 −5
Original line number Diff line number Diff line
@@ -3,9 +3,13 @@
namespace UnicaenLeocarte\Controller;

use UnicaenLeocarte\Options\ModuleOptions;
use UnicaenLeocarte\Service\Photo\PhotoService;
use Zend\Mvc\Controller\ControllerManager;

/**
 * IndexController factory.
 *
 * @author Unicaen
 */
class IndexControllerFactory
{
    function __invoke(ControllerManager $controllerManager)
@@ -13,12 +17,12 @@ class IndexControllerFactory
        /** @var ModuleOptions $options */
        $options = $controllerManager->getServiceLocator()->get('UnicaenLeocarte\Options');

        /** @var \UnicaenLeocarte\Service\Photo\PhotoService $leocarteService */
        $service = $controllerManager->getServiceLocator()->get('UnicaenLeocarte\Service');
        /** @var \UnicaenLeocarte\Service\Photo\PhotoService $photoService */
        $photoService = $controllerManager->getServiceLocator()->get('UnicaenLeocarte\Service\Photo');

        $controller = new IndexController();
        $controller->setPhotoService($service);
        $controller->setCheckDroitUtilisationPhoto($options->getCheckDroitUtilisationPhoto());
        $controller->setPhotoService($photoService);
        $controller->setCheckDroitUtilisationPhoto($options->getPhotoConfig()['check_droit_utilisation_photo']);

        return $controller;
    }
Loading