Loading module/Application/config/merged/agent.config.php +2 −2 Original line number Diff line number Diff line Loading @@ -223,7 +223,7 @@ return [ 'ajouter-application' => [ 'type' => Segment::class, 'options' => [ 'route' => '/ajouter-application/:agent', 'route' => '/ajouter-application/:agent[/:application]', 'defaults' => [ 'controller' => AgentController::class, 'action' => 'ajouter-application', Loading Loading @@ -349,7 +349,7 @@ return [ 'ajouter-formation' => [ 'type' => Segment::class, 'options' => [ 'route' => '/ajouter-formation/:agent', 'route' => '/ajouter-formation/:agent[/:formation]', 'defaults' => [ 'controller' => AgentController::class, 'action' => 'ajouter-formation', Loading module/Application/src/Application/Controller/AgentController.php +8 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ use Application\Form\CompetenceElement\CompetenceElementForm; use Application\Form\CompetenceElement\CompetenceElementFormAwareTrait; use Application\Form\SelectionApplication\SelectionApplicationFormAwareTrait; use Application\Service\Agent\AgentServiceAwareTrait; use Application\Service\Application\ApplicationServiceAwareTrait; use Application\Service\ApplicationElement\ApplicationElementServiceAwareTrait; use Application\Service\Categorie\CategorieServiceAwareTrait; use Application\Service\CompetenceElement\CompetenceElementServiceAwareTrait; Loading Loading @@ -56,6 +57,7 @@ class AgentController extends AbstractActionController use ValidationTypeServiceAwareTrait; use NatureServiceAwareTrait; use FichierServiceAwareTrait; use ApplicationServiceAwareTrait; use FormationServiceAwareTrait; use CategorieServiceAwareTrait; use ParcoursDeFormationServiceAwareTrait; Loading Loading @@ -125,11 +127,13 @@ class AgentController extends AbstractActionController public function ajouterApplicationAction() { $agent = $this->getAgentService()->getRequestedAgent($this); $application = $this->getApplicationService()->getRequestedApplication($this); $applicationElement = new ApplicationElement(); /** @var ApplicationElementForm $form */ $form = $this->getApplicationElementForm(); $form->setAttribute('action', $this->url()->fromRoute('agent/ajouter-application', ['agent' => $agent->getId()], [], true)); $applicationElement->setApplication($application); $form->bind($applicationElement); /** @var Request $request */ Loading Loading @@ -367,13 +371,17 @@ class AgentController extends AbstractActionController public function ajouterFormationAction() { $agent = $this->getAgentService()->getRequestedAgent($this); $formation = $this->getFormationService()->getRequestedFormation($this); $formationElement = new FormationElement(); /** @var FormationElementForm $form */ $form = $this->getFormationElementForm(); $form->setAttribute('action', $this->url()->fromRoute('agent/ajouter-formation', ['agent' => $agent->getId()], [], true)); $formationElement->setFormation($formation); $form->bind($formationElement); /** @var Request $request */ $request = $this->getRequest(); if ($request->isPost()) { Loading module/Application/src/Application/Controller/AgentControllerFactory.php +4 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ namespace Application\Controller; use Application\Form\ApplicationElement\ApplicationElementForm; use Application\Form\CompetenceElement\CompetenceElementForm; use Application\Service\Agent\AgentService; use Application\Service\Application\ApplicationService; use Application\Service\ApplicationElement\ApplicationElementService; use Application\Service\Categorie\CategorieService; use Application\Service\CompetenceElement\CompetenceElementService; Loading Loading @@ -45,6 +46,7 @@ class AgentControllerFactory { * @var NatureService $natureService * @var FichierService $fichierService * @var ApplicationService $applicationService * @var FormationService $formationService * @var StructureService $structureService * @var UserService $userService Loading @@ -63,6 +65,7 @@ class AgentControllerFactory { $validationTypeService = $container->get(ValidationTypeService::class); $natureService = $container->get(NatureService::class); $fichierService = $container->get(FichierService::class); $applicationService = $container->get(ApplicationService::class); $formationService = $container->get(FormationService::class); $userService = $container->get(UserService::class); $structureService = $container->get(StructureService::class); Loading Loading @@ -98,6 +101,7 @@ class AgentControllerFactory { $controller->setNatureService($natureService); $controller->setFichierService($fichierService); $controller->setFormationService($formationService); $controller->setApplicationService($applicationService); $controller->setUserService($userService); $controller->setStructureService($structureService); Loading module/Application/src/Application/Entity/Db/Interfaces/HasApplicationCollectionInterface.php +2 −1 Original line number Diff line number Diff line Loading @@ -3,11 +3,12 @@ namespace Application\Entity\Db\Interfaces; use Application\Entity\Db\Application; use Application\Entity\Db\ApplicationElement; interface HasApplicationCollectionInterface { public function getApplicationCollection() ; public function getApplicationListe(bool $avecHisto = false) : array; public function hasApplication(Application $application) : bool; public function hasApplication(Application $application) : ?ApplicationElement; } No newline at end of file module/Application/src/Application/Entity/Db/Traits/HasApplicationCollectionTrait.php +4 −4 Original line number Diff line number Diff line Loading @@ -32,14 +32,14 @@ trait HasApplicationCollectionTrait { /** * @param Application $application * @return bool * @return ApplicationElement|null */ public function hasApplication(Application $application) : bool public function hasApplication(Application $application) : ?ApplicationElement { /** @var ApplicationElement $applicationElement */ foreach ($this->applications as $applicationElement) { if ($applicationElement->estNonHistorise() AND $applicationElement->getApplication() === $application) return true; if ($applicationElement->estNonHistorise() AND $applicationElement->getApplication() === $application) return $applicationElement; } return false; return null; } } No newline at end of file Loading
module/Application/config/merged/agent.config.php +2 −2 Original line number Diff line number Diff line Loading @@ -223,7 +223,7 @@ return [ 'ajouter-application' => [ 'type' => Segment::class, 'options' => [ 'route' => '/ajouter-application/:agent', 'route' => '/ajouter-application/:agent[/:application]', 'defaults' => [ 'controller' => AgentController::class, 'action' => 'ajouter-application', Loading Loading @@ -349,7 +349,7 @@ return [ 'ajouter-formation' => [ 'type' => Segment::class, 'options' => [ 'route' => '/ajouter-formation/:agent', 'route' => '/ajouter-formation/:agent[/:formation]', 'defaults' => [ 'controller' => AgentController::class, 'action' => 'ajouter-formation', Loading
module/Application/src/Application/Controller/AgentController.php +8 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ use Application\Form\CompetenceElement\CompetenceElementForm; use Application\Form\CompetenceElement\CompetenceElementFormAwareTrait; use Application\Form\SelectionApplication\SelectionApplicationFormAwareTrait; use Application\Service\Agent\AgentServiceAwareTrait; use Application\Service\Application\ApplicationServiceAwareTrait; use Application\Service\ApplicationElement\ApplicationElementServiceAwareTrait; use Application\Service\Categorie\CategorieServiceAwareTrait; use Application\Service\CompetenceElement\CompetenceElementServiceAwareTrait; Loading Loading @@ -56,6 +57,7 @@ class AgentController extends AbstractActionController use ValidationTypeServiceAwareTrait; use NatureServiceAwareTrait; use FichierServiceAwareTrait; use ApplicationServiceAwareTrait; use FormationServiceAwareTrait; use CategorieServiceAwareTrait; use ParcoursDeFormationServiceAwareTrait; Loading Loading @@ -125,11 +127,13 @@ class AgentController extends AbstractActionController public function ajouterApplicationAction() { $agent = $this->getAgentService()->getRequestedAgent($this); $application = $this->getApplicationService()->getRequestedApplication($this); $applicationElement = new ApplicationElement(); /** @var ApplicationElementForm $form */ $form = $this->getApplicationElementForm(); $form->setAttribute('action', $this->url()->fromRoute('agent/ajouter-application', ['agent' => $agent->getId()], [], true)); $applicationElement->setApplication($application); $form->bind($applicationElement); /** @var Request $request */ Loading Loading @@ -367,13 +371,17 @@ class AgentController extends AbstractActionController public function ajouterFormationAction() { $agent = $this->getAgentService()->getRequestedAgent($this); $formation = $this->getFormationService()->getRequestedFormation($this); $formationElement = new FormationElement(); /** @var FormationElementForm $form */ $form = $this->getFormationElementForm(); $form->setAttribute('action', $this->url()->fromRoute('agent/ajouter-formation', ['agent' => $agent->getId()], [], true)); $formationElement->setFormation($formation); $form->bind($formationElement); /** @var Request $request */ $request = $this->getRequest(); if ($request->isPost()) { Loading
module/Application/src/Application/Controller/AgentControllerFactory.php +4 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ namespace Application\Controller; use Application\Form\ApplicationElement\ApplicationElementForm; use Application\Form\CompetenceElement\CompetenceElementForm; use Application\Service\Agent\AgentService; use Application\Service\Application\ApplicationService; use Application\Service\ApplicationElement\ApplicationElementService; use Application\Service\Categorie\CategorieService; use Application\Service\CompetenceElement\CompetenceElementService; Loading Loading @@ -45,6 +46,7 @@ class AgentControllerFactory { * @var NatureService $natureService * @var FichierService $fichierService * @var ApplicationService $applicationService * @var FormationService $formationService * @var StructureService $structureService * @var UserService $userService Loading @@ -63,6 +65,7 @@ class AgentControllerFactory { $validationTypeService = $container->get(ValidationTypeService::class); $natureService = $container->get(NatureService::class); $fichierService = $container->get(FichierService::class); $applicationService = $container->get(ApplicationService::class); $formationService = $container->get(FormationService::class); $userService = $container->get(UserService::class); $structureService = $container->get(StructureService::class); Loading Loading @@ -98,6 +101,7 @@ class AgentControllerFactory { $controller->setNatureService($natureService); $controller->setFichierService($fichierService); $controller->setFormationService($formationService); $controller->setApplicationService($applicationService); $controller->setUserService($userService); $controller->setStructureService($structureService); Loading
module/Application/src/Application/Entity/Db/Interfaces/HasApplicationCollectionInterface.php +2 −1 Original line number Diff line number Diff line Loading @@ -3,11 +3,12 @@ namespace Application\Entity\Db\Interfaces; use Application\Entity\Db\Application; use Application\Entity\Db\ApplicationElement; interface HasApplicationCollectionInterface { public function getApplicationCollection() ; public function getApplicationListe(bool $avecHisto = false) : array; public function hasApplication(Application $application) : bool; public function hasApplication(Application $application) : ?ApplicationElement; } No newline at end of file
module/Application/src/Application/Entity/Db/Traits/HasApplicationCollectionTrait.php +4 −4 Original line number Diff line number Diff line Loading @@ -32,14 +32,14 @@ trait HasApplicationCollectionTrait { /** * @param Application $application * @return bool * @return ApplicationElement|null */ public function hasApplication(Application $application) : bool public function hasApplication(Application $application) : ?ApplicationElement { /** @var ApplicationElement $applicationElement */ foreach ($this->applications as $applicationElement) { if ($applicationElement->estNonHistorise() AND $applicationElement->getApplication() === $application) return true; if ($applicationElement->estNonHistorise() AND $applicationElement->getApplication() === $application) return $applicationElement; } return false; return null; } } No newline at end of file