Loading config/module.config.php +3 −3 Original line number Diff line number Diff line Loading @@ -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, ], Loading config/unicaen-leocarte.global.php.dist +12 −10 Original line number Diff line number Diff line Loading @@ -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. */ Loading @@ -16,5 +17,6 @@ return [ 'width' => 100, 'height' => 120, ], ], ] ]; No newline at end of file config/unicaen-leocarte.local.php.dist +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ return [ 'unicaen-leocarte' => [ 'leocarte' => [ 'soap_client_config' => [ 'wsdl' => [ 'file' => __DIR__ . '/../externalEasyIDWebServices.wsdl', 'username' => 'xxxxx', Loading src/UnicaenLeocarte/Controller/IndexController.php +1 −2 Original line number Diff line number Diff line Loading @@ -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 { Loading @@ -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. Loading src/UnicaenLeocarte/Controller/IndexControllerFactory.php +9 −5 Original line number Diff line number Diff line Loading @@ -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) Loading @@ -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 Loading
config/module.config.php +3 −3 Original line number Diff line number Diff line Loading @@ -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, ], Loading
config/unicaen-leocarte.global.php.dist +12 −10 Original line number Diff line number Diff line Loading @@ -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. */ Loading @@ -16,5 +17,6 @@ return [ 'width' => 100, 'height' => 120, ], ], ] ]; No newline at end of file
config/unicaen-leocarte.local.php.dist +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ return [ 'unicaen-leocarte' => [ 'leocarte' => [ 'soap_client_config' => [ 'wsdl' => [ 'file' => __DIR__ . '/../externalEasyIDWebServices.wsdl', 'username' => 'xxxxx', Loading
src/UnicaenLeocarte/Controller/IndexController.php +1 −2 Original line number Diff line number Diff line Loading @@ -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 { Loading @@ -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. Loading
src/UnicaenLeocarte/Controller/IndexControllerFactory.php +9 −5 Original line number Diff line number Diff line Loading @@ -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) Loading @@ -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