Loading module/Application/src/Application/Entity/Db/Repository/VariableRepository.php +18 −3 Changes for module/Application/src/Application/Entity/Db/Repository/VariableRepository.php: 18 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Application\Entity\Db\Repository; use Application\Constants; use Application\Entity\Db\Etablissement; use Application\Entity\Db\These; use Application\Entity\Db\Variable; Loading @@ -18,10 +19,12 @@ class VariableRepository extends DefaultEntityRepository */ public function findByCodeAndThese($code, These $these) { $dateObservation = $these->getDateSoutenance() ?: $these->getDatePrevisionSoutenance(); return $this->findByCodeAndEtab( $code, $these->getEtablissement(), $these->getDateSoutenance() ?: $these->getDatePrevisionSoutenance()); $dateObservation ?: new \DateTime()); } /** Loading Loading @@ -61,7 +64,13 @@ class VariableRepository extends DefaultEntityRepository if (! is_array($code)) { $variable = current($results) ?: null; if ($variable === null) throw new RuntimeException("La valeur pour le variable [".$code."] est manquante pour l'établissement [".$etab->getCode()."]."); if ($variable === null) { throw new RuntimeException(sprintf( "La valeur de la variable '%s' est manquante pour l'établissement '%s' " . "à la date d'observation %s.", $code, $etab->getCode(), $dateObservation->format(Constants::DATE_FORMAT) )); } return $variable; } Loading @@ -70,7 +79,13 @@ class VariableRepository extends DefaultEntityRepository $variables[$v->getCode()] = $v; } foreach ($code as $c) { if (!isset($variables[$c])) throw new RuntimeException("La valeur pour le variable [".$c."] est manquante pour l'établissement [".$etab->getCode()."]."); if (!isset($variables[$c])) { throw new RuntimeException(sprintf( "La valeur de la variable '%s' est manquante pour l'établissement '%s' " . "à la date d'observation %s.", $c, $etab->getCode(), $dateObservation->format(Constants::DATE_FORMAT) )); } } return $variables; Loading module/Application/src/Application/Notification/ResultatTheseAdmisNotification.php +1 −1 Changes for module/Application/src/Application/Notification/ResultatTheseAdmisNotification.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ class ResultatTheseAdmisNotification extends Notification { use TheseAwareTrait; protected $templatePath = 'application/these/mail/notif-resultat-these-modifie'; protected $templatePath = 'application/import/mail/notif-resultat-admis-doctorant'; /** * @return static Loading module/Application/src/Application/Notification/ResultatTheseModifieNotification.php +1 −1 Changes for module/Application/src/Application/Notification/ResultatTheseModifieNotification.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ class ResultatTheseModifieNotification extends Notification { use TheseAwareTrait; protected $templatePath = 'application/these/mail/notif-resultat-these-modifie'; protected $templatePath = 'application/import/mail/notif-evenement-import'; /** * @return static Loading module/Application/src/Application/Service/Notification/NotificationFactoryFactory.php +7 −7 Changes for module/Application/src/Application/Service/Notification/NotificationFactoryFactory.php: 7 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -6,9 +6,10 @@ use Application\Service\EcoleDoctorale\EcoleDoctoraleService; use Application\Service\UniteRecherche\UniteRechercheService; use Application\Service\Variable\VariableService; use UnicaenApp\Options\ModuleOptions; use Zend\Mvc\Router\RouteStackInterface; use Zend\Mvc\View\Console\ViewManager as ConsoleViewManager; use Zend\Mvc\View\Http\ViewManager as HttpViewManager; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\View\Helper\Url; use Zend\View\Helper\Url as UrlHelper; /** * @author Unicaen Loading Loading @@ -40,11 +41,10 @@ class NotificationFactoryFactory extends \Notification\Service\NotificationFacto $ecoleDoctoraleService = $serviceLocator->get('EcoleDoctoraleService'); $uniteRechercheService = $serviceLocator->get('UniteRechercheService'); /** @var RouteStackInterface $router */ $router = $serviceLocator->get('router'); /* @var Url $urlHelper */ $urlHelper = $serviceLocator->get('ViewHelperManager')->get('Url'); $urlHelper->setRouter($router); /** @var HttpViewManager|ConsoleViewManager $vm */ $vm = $serviceLocator->get('ViewManager'); /** @var UrlHelper $urlHelper */ $urlHelper = $vm->getHelperManager()->get('Url'); /* @var ModuleOptions $moduleOptions */ $moduleOptions = $serviceLocator->get('unicaen-app_module_options'); Loading module/Application/src/Application/Service/Notification/NotifierServiceFactory.php +6 −7 Changes for module/Application/src/Application/Service/Notification/NotifierServiceFactory.php: 6 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -7,7 +7,8 @@ use Application\Service\Individu\IndividuService; use Application\Service\Role\RoleService; use Application\Service\UniteRecherche\UniteRechercheService; use Application\Service\Variable\VariableService; use Zend\Mvc\Router\RouteStackInterface; use Zend\Mvc\View\Http\ViewManager as HttpViewManager; use Zend\Mvc\View\Console\ViewManager as ConsoleViewManager; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\View\Helper\Url as UrlHelper; Loading Loading @@ -42,12 +43,10 @@ class NotifierServiceFactory extends \Notification\Service\NotifierServiceFactor $individuService = $serviceLocator->get('IndividuService'); $roleService = $serviceLocator->get('RoleService'); /** @var RouteStackInterface $router */ $router = $serviceLocator->get('router'); $viewHelperManager = $serviceLocator->get('ViewHelperManager'); /* @var UrlHelper $urlHelper */ $urlHelper = $viewHelperManager->get('Url'); $urlHelper->setRouter($router); /** @var HttpViewManager|ConsoleViewManager $vm */ $vm = $serviceLocator->get('ViewManager'); /** @var UrlHelper $urlHelper */ $urlHelper = $vm->getHelperManager()->get('Url'); /** @var NotificationFactory $notificationFactory */ $notificationFactory = $serviceLocator->get(NotificationFactory::class); Loading Loading
module/Application/src/Application/Entity/Db/Repository/VariableRepository.php +18 −3 Changes for module/Application/src/Application/Entity/Db/Repository/VariableRepository.php: 18 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Application\Entity\Db\Repository; use Application\Constants; use Application\Entity\Db\Etablissement; use Application\Entity\Db\These; use Application\Entity\Db\Variable; Loading @@ -18,10 +19,12 @@ class VariableRepository extends DefaultEntityRepository */ public function findByCodeAndThese($code, These $these) { $dateObservation = $these->getDateSoutenance() ?: $these->getDatePrevisionSoutenance(); return $this->findByCodeAndEtab( $code, $these->getEtablissement(), $these->getDateSoutenance() ?: $these->getDatePrevisionSoutenance()); $dateObservation ?: new \DateTime()); } /** Loading Loading @@ -61,7 +64,13 @@ class VariableRepository extends DefaultEntityRepository if (! is_array($code)) { $variable = current($results) ?: null; if ($variable === null) throw new RuntimeException("La valeur pour le variable [".$code."] est manquante pour l'établissement [".$etab->getCode()."]."); if ($variable === null) { throw new RuntimeException(sprintf( "La valeur de la variable '%s' est manquante pour l'établissement '%s' " . "à la date d'observation %s.", $code, $etab->getCode(), $dateObservation->format(Constants::DATE_FORMAT) )); } return $variable; } Loading @@ -70,7 +79,13 @@ class VariableRepository extends DefaultEntityRepository $variables[$v->getCode()] = $v; } foreach ($code as $c) { if (!isset($variables[$c])) throw new RuntimeException("La valeur pour le variable [".$c."] est manquante pour l'établissement [".$etab->getCode()."]."); if (!isset($variables[$c])) { throw new RuntimeException(sprintf( "La valeur de la variable '%s' est manquante pour l'établissement '%s' " . "à la date d'observation %s.", $c, $etab->getCode(), $dateObservation->format(Constants::DATE_FORMAT) )); } } return $variables; Loading
module/Application/src/Application/Notification/ResultatTheseAdmisNotification.php +1 −1 Changes for module/Application/src/Application/Notification/ResultatTheseAdmisNotification.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ class ResultatTheseAdmisNotification extends Notification { use TheseAwareTrait; protected $templatePath = 'application/these/mail/notif-resultat-these-modifie'; protected $templatePath = 'application/import/mail/notif-resultat-admis-doctorant'; /** * @return static Loading
module/Application/src/Application/Notification/ResultatTheseModifieNotification.php +1 −1 Changes for module/Application/src/Application/Notification/ResultatTheseModifieNotification.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ class ResultatTheseModifieNotification extends Notification { use TheseAwareTrait; protected $templatePath = 'application/these/mail/notif-resultat-these-modifie'; protected $templatePath = 'application/import/mail/notif-evenement-import'; /** * @return static Loading
module/Application/src/Application/Service/Notification/NotificationFactoryFactory.php +7 −7 Changes for module/Application/src/Application/Service/Notification/NotificationFactoryFactory.php: 7 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -6,9 +6,10 @@ use Application\Service\EcoleDoctorale\EcoleDoctoraleService; use Application\Service\UniteRecherche\UniteRechercheService; use Application\Service\Variable\VariableService; use UnicaenApp\Options\ModuleOptions; use Zend\Mvc\Router\RouteStackInterface; use Zend\Mvc\View\Console\ViewManager as ConsoleViewManager; use Zend\Mvc\View\Http\ViewManager as HttpViewManager; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\View\Helper\Url; use Zend\View\Helper\Url as UrlHelper; /** * @author Unicaen Loading Loading @@ -40,11 +41,10 @@ class NotificationFactoryFactory extends \Notification\Service\NotificationFacto $ecoleDoctoraleService = $serviceLocator->get('EcoleDoctoraleService'); $uniteRechercheService = $serviceLocator->get('UniteRechercheService'); /** @var RouteStackInterface $router */ $router = $serviceLocator->get('router'); /* @var Url $urlHelper */ $urlHelper = $serviceLocator->get('ViewHelperManager')->get('Url'); $urlHelper->setRouter($router); /** @var HttpViewManager|ConsoleViewManager $vm */ $vm = $serviceLocator->get('ViewManager'); /** @var UrlHelper $urlHelper */ $urlHelper = $vm->getHelperManager()->get('Url'); /* @var ModuleOptions $moduleOptions */ $moduleOptions = $serviceLocator->get('unicaen-app_module_options'); Loading
module/Application/src/Application/Service/Notification/NotifierServiceFactory.php +6 −7 Changes for module/Application/src/Application/Service/Notification/NotifierServiceFactory.php: 6 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -7,7 +7,8 @@ use Application\Service\Individu\IndividuService; use Application\Service\Role\RoleService; use Application\Service\UniteRecherche\UniteRechercheService; use Application\Service\Variable\VariableService; use Zend\Mvc\Router\RouteStackInterface; use Zend\Mvc\View\Http\ViewManager as HttpViewManager; use Zend\Mvc\View\Console\ViewManager as ConsoleViewManager; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\View\Helper\Url as UrlHelper; Loading Loading @@ -42,12 +43,10 @@ class NotifierServiceFactory extends \Notification\Service\NotifierServiceFactor $individuService = $serviceLocator->get('IndividuService'); $roleService = $serviceLocator->get('RoleService'); /** @var RouteStackInterface $router */ $router = $serviceLocator->get('router'); $viewHelperManager = $serviceLocator->get('ViewHelperManager'); /* @var UrlHelper $urlHelper */ $urlHelper = $viewHelperManager->get('Url'); $urlHelper->setRouter($router); /** @var HttpViewManager|ConsoleViewManager $vm */ $vm = $serviceLocator->get('ViewManager'); /** @var UrlHelper $urlHelper */ $urlHelper = $vm->getHelperManager()->get('Url'); /** @var NotificationFactory $notificationFactory */ $notificationFactory = $serviceLocator->get(NotificationFactory::class); Loading