Loading module/Application/src/Application/Entity/Db/Interfaces/HasSourceInterface.php +5 −2 Changes for module/Application/src/Application/Entity/Db/Interfaces/HasSourceInterface.php: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -2,13 +2,16 @@ namespace Application\Entity\Db\Interfaces; use UnicaenDbImport\Entity\Db\Source; interface HasSourceInterface { const SOURCE_EMC2 = 'EMC2'; const SOURCE_OCTOPUS = 'OCTOPUS'; const SOURCE_LAGAF = 'LAGAF'; public function getSource() : ?string; public function getSource() : ?Source; public function getIdSource() : ?string; public function setSource(?string $source); public function setSource(?Source $source); public function setIdSource(?string $id); } No newline at end of file module/Application/src/Application/Entity/Db/Traits/HasSourceTrait.php +7 −6 Changes for module/Application/src/Application/Entity/Db/Traits/HasSourceTrait.php: 7 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -2,17 +2,18 @@ namespace Application\Entity\Db\Traits; use UnicaenDbImport\Entity\Db\Source; trait HasSourceTrait { /** @var string */ private $source; private ?Source $source = null; /** @var string */ private $idSource; /** * @return string|null * @return Source|null */ public function getSource() : ?string public function getSource() : ?Source { return $this->source; } Loading @@ -26,10 +27,10 @@ trait HasSourceTrait { } /** * @param string|null $source * @param Source|null $source * @return self */ public function setSource(?string $source) : self public function setSource(?Source $source) : self { $this->source = $source; return $this; Loading module/Formation/config/merged/formation-instance-document.config.php +19 −0 Changes for module/Formation/config/merged/formation-instance-document.config.php: 19 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -30,6 +30,15 @@ return [ FormationinstancedocumentPrivileges::FORMATIONINSTANCEDOCUMENT_ATTESTATION ], ], [ 'controller' => FormationInstanceDocumentController::class, 'action' => [ 'generer-historique', ], 'privileges' => [ FormationinstancedocumentPrivileges::FORMATIONINSTANCEDOCUMENT_HISTORIQUE ], ], [ 'controller' => FormationInstanceDocumentController::class, 'action' => [ Loading Loading @@ -68,6 +77,16 @@ return [ ], ], ], 'generer-historique' => [ 'type' => Segment::class, 'options' => [ 'route' => '/generer-historique/:agent', 'defaults' => [ 'controller' => FormationInstanceDocumentController::class, 'action' => 'generer-historique', ], ], ], 'export-emargement' => [ 'type' => Segment::class, 'options' => [ Loading module/Formation/config/merged/formation-instance.config.php +11 −0 Changes for module/Formation/config/merged/formation-instance.config.php: 11 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ return [ 'controller' => FormationInstanceController::class, 'action' => [ 'annuler', 'reouvrir', ], 'privileges' => [ FormationinstancePrivileges::FORMATIONINSTANCE_ANNULER, Loading Loading @@ -226,6 +227,16 @@ return [ ], ], ], 'reouvrir' => [ 'type' => Segment::class, 'options' => [ 'route' => '/reouvrir/:formation-instance', 'defaults' => [ 'controller' => FormationInstanceController::class, 'action' => 'reouvrir', ], ], ], 'modifier-informations' => [ 'type' => Segment::class, 'options' => [ Loading module/Formation/src/Formation/Controller/FormationController.php +8 −2 Changes for module/Formation/src/Formation/Controller/FormationController.php: 8 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ use Laminas\Http\Response; use Laminas\Mvc\Controller\AbstractActionController; use Laminas\View\Model\JsonModel; use Laminas\View\Model\ViewModel; use UnicaenDbImport\Entity\Db\Service\Source\SourceServiceAwareTrait; use UnicaenDbImport\Entity\Db\Source; class FormationController extends AbstractActionController { Loading @@ -30,12 +32,13 @@ class FormationController extends AbstractActionController use FormationServiceAwareTrait; use FormationGroupeServiceAwareTrait; use ParcoursDeFormationServiceAwareTrait; use FormationFormAwareTrait; use SourceServiceAwareTrait; use ApplicationElementFormAwareTrait; use ApplicationElementServiceAwareTrait; use CompetenceElementFormAwareTrait; use CompetenceElementServiceAwareTrait; use FormationFormAwareTrait; use SelectionFormationFormAwareTrait; /** CRUD **********************************************************************************************************/ Loading Loading @@ -77,8 +80,11 @@ class FormationController extends AbstractActionController $data = $request->getPost(); $form->setData($data); if ($form->isValid()) { $this->getFormationService()->create($formation); $formation->setSource(HasSourceInterface::SOURCE_EMC2); /** @var Source $source */ $source = $this->sourceService->getRepository()->findOneBy(['code' => HasSourceInterface::SOURCE_EMC2]); $formation->setSource($source); $formation->setIdSource($formation->getId()); $this->getFormationService()->update($formation); exit; Loading Loading
module/Application/src/Application/Entity/Db/Interfaces/HasSourceInterface.php +5 −2 Changes for module/Application/src/Application/Entity/Db/Interfaces/HasSourceInterface.php: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -2,13 +2,16 @@ namespace Application\Entity\Db\Interfaces; use UnicaenDbImport\Entity\Db\Source; interface HasSourceInterface { const SOURCE_EMC2 = 'EMC2'; const SOURCE_OCTOPUS = 'OCTOPUS'; const SOURCE_LAGAF = 'LAGAF'; public function getSource() : ?string; public function getSource() : ?Source; public function getIdSource() : ?string; public function setSource(?string $source); public function setSource(?Source $source); public function setIdSource(?string $id); } No newline at end of file
module/Application/src/Application/Entity/Db/Traits/HasSourceTrait.php +7 −6 Changes for module/Application/src/Application/Entity/Db/Traits/HasSourceTrait.php: 7 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -2,17 +2,18 @@ namespace Application\Entity\Db\Traits; use UnicaenDbImport\Entity\Db\Source; trait HasSourceTrait { /** @var string */ private $source; private ?Source $source = null; /** @var string */ private $idSource; /** * @return string|null * @return Source|null */ public function getSource() : ?string public function getSource() : ?Source { return $this->source; } Loading @@ -26,10 +27,10 @@ trait HasSourceTrait { } /** * @param string|null $source * @param Source|null $source * @return self */ public function setSource(?string $source) : self public function setSource(?Source $source) : self { $this->source = $source; return $this; Loading
module/Formation/config/merged/formation-instance-document.config.php +19 −0 Changes for module/Formation/config/merged/formation-instance-document.config.php: 19 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -30,6 +30,15 @@ return [ FormationinstancedocumentPrivileges::FORMATIONINSTANCEDOCUMENT_ATTESTATION ], ], [ 'controller' => FormationInstanceDocumentController::class, 'action' => [ 'generer-historique', ], 'privileges' => [ FormationinstancedocumentPrivileges::FORMATIONINSTANCEDOCUMENT_HISTORIQUE ], ], [ 'controller' => FormationInstanceDocumentController::class, 'action' => [ Loading Loading @@ -68,6 +77,16 @@ return [ ], ], ], 'generer-historique' => [ 'type' => Segment::class, 'options' => [ 'route' => '/generer-historique/:agent', 'defaults' => [ 'controller' => FormationInstanceDocumentController::class, 'action' => 'generer-historique', ], ], ], 'export-emargement' => [ 'type' => Segment::class, 'options' => [ Loading
module/Formation/config/merged/formation-instance.config.php +11 −0 Changes for module/Formation/config/merged/formation-instance.config.php: 11 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ return [ 'controller' => FormationInstanceController::class, 'action' => [ 'annuler', 'reouvrir', ], 'privileges' => [ FormationinstancePrivileges::FORMATIONINSTANCE_ANNULER, Loading Loading @@ -226,6 +227,16 @@ return [ ], ], ], 'reouvrir' => [ 'type' => Segment::class, 'options' => [ 'route' => '/reouvrir/:formation-instance', 'defaults' => [ 'controller' => FormationInstanceController::class, 'action' => 'reouvrir', ], ], ], 'modifier-informations' => [ 'type' => Segment::class, 'options' => [ Loading
module/Formation/src/Formation/Controller/FormationController.php +8 −2 Changes for module/Formation/src/Formation/Controller/FormationController.php: 8 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ use Laminas\Http\Response; use Laminas\Mvc\Controller\AbstractActionController; use Laminas\View\Model\JsonModel; use Laminas\View\Model\ViewModel; use UnicaenDbImport\Entity\Db\Service\Source\SourceServiceAwareTrait; use UnicaenDbImport\Entity\Db\Source; class FormationController extends AbstractActionController { Loading @@ -30,12 +32,13 @@ class FormationController extends AbstractActionController use FormationServiceAwareTrait; use FormationGroupeServiceAwareTrait; use ParcoursDeFormationServiceAwareTrait; use FormationFormAwareTrait; use SourceServiceAwareTrait; use ApplicationElementFormAwareTrait; use ApplicationElementServiceAwareTrait; use CompetenceElementFormAwareTrait; use CompetenceElementServiceAwareTrait; use FormationFormAwareTrait; use SelectionFormationFormAwareTrait; /** CRUD **********************************************************************************************************/ Loading Loading @@ -77,8 +80,11 @@ class FormationController extends AbstractActionController $data = $request->getPost(); $form->setData($data); if ($form->isValid()) { $this->getFormationService()->create($formation); $formation->setSource(HasSourceInterface::SOURCE_EMC2); /** @var Source $source */ $source = $this->sourceService->getRepository()->findOneBy(['code' => HasSourceInterface::SOURCE_EMC2]); $formation->setSource($source); $formation->setIdSource($formation->getId()); $this->getFormationService()->update($formation); exit; Loading