Loading module/Application/src/Application/Controller/FicheMetier/FicheMetierController.php +19 −9 Changes for module/Application/src/Application/Controller/FicheMetier/FicheMetierController.php: 19 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -3,14 +3,16 @@ namespace Application\Controller\FicheMetier; use Application\Entity\Db\FicheMetier; use Application\Entity\Db\MissionComplementaire; use Application\Entity\Db\SpecificitePoste; use Application\Form\Agent\AgentForm; use Application\Form\FicheMetier\AssocierAgentForm; use Application\Form\FicheMetier\AssocierAgentFormAwareTrait; use Application\Form\FicheMetier\AssocierMetierTypeForm; use Application\Form\FicheMetier\AssocierPosteForm; use Application\Form\FicheMetier\AssocierMetierTypeFormAwareTrait; use Application\Form\FicheMetier\AssocierPosteFormAwareTrait; use Application\Form\FicheMetier\FicheMetierCreationForm; use Application\Form\FicheMetier\FicheMetierCreationFormAwareTrait; use Application\Form\FicheMetier\SpecificitePosteForm; use Application\Form\FicheMetier\SpecificitePosteFormAwareTrait; use Application\Service\Activite\ActiviteServiceAwareTrait; use Application\Service\Agent\AgentServiceAwareTrait; use Application\Service\FicheMetier\FicheMetierServiceAwareTrait; Loading @@ -21,9 +23,16 @@ use Zend\View\Model\ViewModel; class FicheMetierController extends AbstractActionController { /** Traits utilisés pour les services */ use FicheMetierServiceAwareTrait; use AgentServiceAwareTrait; use ActiviteServiceAwareTrait; /** Traits utilisés pour les formulaires*/ use AssocierAgentFormAwareTrait; use AssocierMetierTypeFormAwareTrait; use AssocierPosteFormAwareTrait; use FicheMetierCreationFormAwareTrait; use SpecificitePosteFormAwareTrait; public function indexAction() { Loading Loading @@ -85,7 +94,7 @@ class FicheMetierController extends AbstractActionController public function creerAction() { /** @var FicheMetierCreationForm $form */ $form = $this->getServiceLocator()->get('FormElementManager')->get(FicheMetierCreationForm::class); $form = $this->getFicherMetierCreationForm(); $fiche = new FicheMetier(); $form->bind($fiche); Loading Loading @@ -114,7 +123,7 @@ class FicheMetierController extends AbstractActionController $fiche = $this->getFicheMetierService()->getFicheMetier($ficheId); /** @var AssocierMetierTypeForm $form */ $form = $this->getServiceLocator()->get('FormElementManager')->get(AssocierMetierTypeForm::class); $form = $this->getAssocierMetierTypeForm(); $form->setAttribute('action', $this->url()->fromRoute('fiche-metier/associer-metier-type', ['fiche' => $fiche->getId()], [], true)); $form->bind($fiche); Loading Loading @@ -147,7 +156,7 @@ class FicheMetierController extends AbstractActionController $fiche = $this->getFicheMetierService()->getFicheMetier($ficheId); /** @var AssocierAgentForm $form */ $form = $this->getServiceLocator()->get('FormElementManager')->get(AssocierAgentForm::class); $form = $this->getAssocierAgentForm(); $form->setAttribute('action', $this->url()->fromRoute('fiche-metier/associer-agent', ['fiche' => $fiche->getId()], [], true)); $form->bind($fiche); Loading @@ -163,10 +172,11 @@ class FicheMetierController extends AbstractActionController $vm = new ViewModel(); $vm->setTemplate('application/default/default-form'); // $vm->setTemplate('application/default/default-form'); $vm->setVariables([ 'title' => 'Associer un agent', 'form' => $form, 'agents' => $this->getAgentService()->getAgents(), ]); return $vm; Loading @@ -180,7 +190,7 @@ class FicheMetierController extends AbstractActionController $fiche = $this->getFicheMetierService()->getFicheMetier($ficheId); /** @var AssocierAgentForm $form */ $form = $this->getServiceLocator()->get('FormElementManager')->get(AssocierPosteForm::class); $form = $this->getAssocierPosteForm(); $form->setAttribute('action', $this->url()->fromRoute('fiche-metier/associer-poste', ['fiche' => $fiche->getId()], [], true)); $form->bind($fiche); Loading Loading @@ -221,7 +231,7 @@ class FicheMetierController extends AbstractActionController } /** @var SpecificitePosteForm $form */ $form = $form = $this->getServiceLocator()->get('FormElementManager')->get(SpecificitePosteForm::class); $form = $form = $this->getSpecificitePosteForm(); $form->setAttribute('action', $this->url()->fromRoute('fiche-metier/specificite', ['fiche' => $fiche->getId()], [], true)); $form->bind($specificite); Loading module/Application/src/Application/Controller/FicheMetier/FicheMetierControllerFactory.php +30 −4 Changes for module/Application/src/Application/Controller/FicheMetier/FicheMetierControllerFactory.php: 30 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,11 @@ namespace Application\Controller\FicheMetier; use Application\Form\FicheMetier\AssocierAgentForm; use Application\Form\FicheMetier\AssocierMetierTypeForm; use Application\Form\FicheMetier\AssocierPosteForm; use Application\Form\FicheMetier\FicheMetierCreationForm; use Application\Form\FicheMetier\SpecificitePosteForm; use Application\Service\Activite\ActiviteService; use Application\Service\Agent\AgentService; use Application\Service\FicheMetier\FicheMetierService; Loading @@ -9,22 +14,43 @@ use Zend\Mvc\Controller\ControllerManager; class FicheMetierControllerFactory { public function __invoke(ControllerManager $controllerManager) public function __invoke(ControllerManager $manager) { /** * @var FicheMetierService $ficheMetierService * @var AgentService $agentService * @var ActiviteService $activiteService */ $ficheMetierService = $controllerManager->getServiceLocator()->get(FicheMetierService::class); $agentService = $controllerManager->getServiceLocator()->get(AgentService::class); $activiteService = $controllerManager->getServiceLocator()->get(ActiviteService::class); $ficheMetierService = $manager->getServiceLocator()->get(FicheMetierService::class); $agentService = $manager->getServiceLocator()->get(AgentService::class); $activiteService = $manager->getServiceLocator()->get(ActiviteService::class); /** * @var AssocierAgentForm $associerAgentForm * @var AssocierMetierTypeForm $associerMetierTypeForm * @var AssocierPosteForm $associerPosteForm * @var FicheMetierCreationForm $ficheMetierCreationForm * @var SpecificitePosteForm $specificitePosteForm */ $associerAgentForm = $manager->getServiceLocator()->get('FormElementManager')->get(AssocierAgentForm::class); $associerMetierTypeForm = $manager->getServiceLocator()->get('FormElementManager')->get(AssocierMetierTypeForm::class); $associerPosteForm = $manager->getServiceLocator()->get('FormElementManager')->get(AssocierPosteForm::class); $ficheMetierCreationForm = $manager->getServiceLocator()->get('FormElementManager')->get(FicheMetierCreationForm::class); $specificitePosteForm = $manager->getServiceLocator()->get('FormElementManager')->get(SpecificitePosteForm::class); /** @var FicheMetierController $controller */ $controller = new FicheMetierController(); $controller->setFicheMetierService($ficheMetierService); $controller->setAgentService($agentService); $controller->setActiviteService($activiteService); $controller->setAssocierAgentForm($associerAgentForm); $controller->setAssocierMetierTypeForm($associerMetierTypeForm); $controller->setAssocierPosteForm($associerPosteForm); $controller->setFicherMetierCreationForm($ficheMetierCreationForm); $controller->setSpecificitePosteForm($specificitePosteForm); return $controller; } Loading module/Application/src/Application/Form/FicheMetier/AssocierAgentFormAwareTrait.php +27 Changes for module/Application/src/Application/Form/FicheMetier/AssocierAgentFormAwareTrait.php: 27 added lines, 0 removed lines. Original line number Diff line number Diff line <?php namespace Application\Form\FicheMetier; trait AssocierAgentFormAwareTrait { /** @var AssocierAgentForm $associerAgentForm */ private $associerAgentForm; /** * @return AssocierAgentForm */ public function getAssocierAgentForm() { return $this->associerAgentForm; } /** * @param AssocierAgentForm $associerAgentForm * @return AssocierAgentForm */ public function setAssocierAgentForm($associerAgentForm) { $this->associerAgentForm = $associerAgentForm; return $this->associerAgentForm; } } No newline at end of file module/Application/src/Application/Form/FicheMetier/AssocierMetierTypeFormAwareTrait.php +29 Changes for module/Application/src/Application/Form/FicheMetier/AssocierMetierTypeFormAwareTrait.php: 29 added lines, 0 removed lines. Original line number Diff line number Diff line <?php namespace Application\Form\FicheMetier; trait AssocierMetierTypeFormAwareTrait { /** @var AssocierMetierTypeForm $associerMetierTypeForm */ private $associerMetierTypeForm; /** * @return AssocierMetierTypeForm */ public function getAssocierMetierTypeForm() { return $this->associerMetierTypeForm; } /** * @param AssocierMetierTypeForm $associerMetierTypeForm * @return AssocierMetierTypeForm */ public function setAssocierMetierTypeForm($associerMetierTypeForm) { $this->associerMetierTypeForm = $associerMetierTypeForm; return $this->associerMetierTypeForm; } } No newline at end of file module/Application/src/Application/Form/FicheMetier/AssocierPosteFormAwareTrait.php +29 Changes for module/Application/src/Application/Form/FicheMetier/AssocierPosteFormAwareTrait.php: 29 added lines, 0 removed lines. Original line number Diff line number Diff line <?php namespace Application\Form\FicheMetier; trait AssocierPosteFormAwareTrait { /** @var AssocierPosteForm $associerPosteForm */ private $associerPosteForm; /** * @return AssocierPosteForm */ public function getAssocierPosteForm() { return $this->associerPosteForm; } /** * @param AssocierPosteForm $associerPosteForm * @return AssocierPosteForm */ public function setAssocierPosteForm($associerPosteForm) { $this->associerPosteForm = $associerPosteForm; return $this->associerPosteForm; } } No newline at end of file Loading
module/Application/src/Application/Controller/FicheMetier/FicheMetierController.php +19 −9 Changes for module/Application/src/Application/Controller/FicheMetier/FicheMetierController.php: 19 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -3,14 +3,16 @@ namespace Application\Controller\FicheMetier; use Application\Entity\Db\FicheMetier; use Application\Entity\Db\MissionComplementaire; use Application\Entity\Db\SpecificitePoste; use Application\Form\Agent\AgentForm; use Application\Form\FicheMetier\AssocierAgentForm; use Application\Form\FicheMetier\AssocierAgentFormAwareTrait; use Application\Form\FicheMetier\AssocierMetierTypeForm; use Application\Form\FicheMetier\AssocierPosteForm; use Application\Form\FicheMetier\AssocierMetierTypeFormAwareTrait; use Application\Form\FicheMetier\AssocierPosteFormAwareTrait; use Application\Form\FicheMetier\FicheMetierCreationForm; use Application\Form\FicheMetier\FicheMetierCreationFormAwareTrait; use Application\Form\FicheMetier\SpecificitePosteForm; use Application\Form\FicheMetier\SpecificitePosteFormAwareTrait; use Application\Service\Activite\ActiviteServiceAwareTrait; use Application\Service\Agent\AgentServiceAwareTrait; use Application\Service\FicheMetier\FicheMetierServiceAwareTrait; Loading @@ -21,9 +23,16 @@ use Zend\View\Model\ViewModel; class FicheMetierController extends AbstractActionController { /** Traits utilisés pour les services */ use FicheMetierServiceAwareTrait; use AgentServiceAwareTrait; use ActiviteServiceAwareTrait; /** Traits utilisés pour les formulaires*/ use AssocierAgentFormAwareTrait; use AssocierMetierTypeFormAwareTrait; use AssocierPosteFormAwareTrait; use FicheMetierCreationFormAwareTrait; use SpecificitePosteFormAwareTrait; public function indexAction() { Loading Loading @@ -85,7 +94,7 @@ class FicheMetierController extends AbstractActionController public function creerAction() { /** @var FicheMetierCreationForm $form */ $form = $this->getServiceLocator()->get('FormElementManager')->get(FicheMetierCreationForm::class); $form = $this->getFicherMetierCreationForm(); $fiche = new FicheMetier(); $form->bind($fiche); Loading Loading @@ -114,7 +123,7 @@ class FicheMetierController extends AbstractActionController $fiche = $this->getFicheMetierService()->getFicheMetier($ficheId); /** @var AssocierMetierTypeForm $form */ $form = $this->getServiceLocator()->get('FormElementManager')->get(AssocierMetierTypeForm::class); $form = $this->getAssocierMetierTypeForm(); $form->setAttribute('action', $this->url()->fromRoute('fiche-metier/associer-metier-type', ['fiche' => $fiche->getId()], [], true)); $form->bind($fiche); Loading Loading @@ -147,7 +156,7 @@ class FicheMetierController extends AbstractActionController $fiche = $this->getFicheMetierService()->getFicheMetier($ficheId); /** @var AssocierAgentForm $form */ $form = $this->getServiceLocator()->get('FormElementManager')->get(AssocierAgentForm::class); $form = $this->getAssocierAgentForm(); $form->setAttribute('action', $this->url()->fromRoute('fiche-metier/associer-agent', ['fiche' => $fiche->getId()], [], true)); $form->bind($fiche); Loading @@ -163,10 +172,11 @@ class FicheMetierController extends AbstractActionController $vm = new ViewModel(); $vm->setTemplate('application/default/default-form'); // $vm->setTemplate('application/default/default-form'); $vm->setVariables([ 'title' => 'Associer un agent', 'form' => $form, 'agents' => $this->getAgentService()->getAgents(), ]); return $vm; Loading @@ -180,7 +190,7 @@ class FicheMetierController extends AbstractActionController $fiche = $this->getFicheMetierService()->getFicheMetier($ficheId); /** @var AssocierAgentForm $form */ $form = $this->getServiceLocator()->get('FormElementManager')->get(AssocierPosteForm::class); $form = $this->getAssocierPosteForm(); $form->setAttribute('action', $this->url()->fromRoute('fiche-metier/associer-poste', ['fiche' => $fiche->getId()], [], true)); $form->bind($fiche); Loading Loading @@ -221,7 +231,7 @@ class FicheMetierController extends AbstractActionController } /** @var SpecificitePosteForm $form */ $form = $form = $this->getServiceLocator()->get('FormElementManager')->get(SpecificitePosteForm::class); $form = $form = $this->getSpecificitePosteForm(); $form->setAttribute('action', $this->url()->fromRoute('fiche-metier/specificite', ['fiche' => $fiche->getId()], [], true)); $form->bind($specificite); Loading
module/Application/src/Application/Controller/FicheMetier/FicheMetierControllerFactory.php +30 −4 Changes for module/Application/src/Application/Controller/FicheMetier/FicheMetierControllerFactory.php: 30 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,11 @@ namespace Application\Controller\FicheMetier; use Application\Form\FicheMetier\AssocierAgentForm; use Application\Form\FicheMetier\AssocierMetierTypeForm; use Application\Form\FicheMetier\AssocierPosteForm; use Application\Form\FicheMetier\FicheMetierCreationForm; use Application\Form\FicheMetier\SpecificitePosteForm; use Application\Service\Activite\ActiviteService; use Application\Service\Agent\AgentService; use Application\Service\FicheMetier\FicheMetierService; Loading @@ -9,22 +14,43 @@ use Zend\Mvc\Controller\ControllerManager; class FicheMetierControllerFactory { public function __invoke(ControllerManager $controllerManager) public function __invoke(ControllerManager $manager) { /** * @var FicheMetierService $ficheMetierService * @var AgentService $agentService * @var ActiviteService $activiteService */ $ficheMetierService = $controllerManager->getServiceLocator()->get(FicheMetierService::class); $agentService = $controllerManager->getServiceLocator()->get(AgentService::class); $activiteService = $controllerManager->getServiceLocator()->get(ActiviteService::class); $ficheMetierService = $manager->getServiceLocator()->get(FicheMetierService::class); $agentService = $manager->getServiceLocator()->get(AgentService::class); $activiteService = $manager->getServiceLocator()->get(ActiviteService::class); /** * @var AssocierAgentForm $associerAgentForm * @var AssocierMetierTypeForm $associerMetierTypeForm * @var AssocierPosteForm $associerPosteForm * @var FicheMetierCreationForm $ficheMetierCreationForm * @var SpecificitePosteForm $specificitePosteForm */ $associerAgentForm = $manager->getServiceLocator()->get('FormElementManager')->get(AssocierAgentForm::class); $associerMetierTypeForm = $manager->getServiceLocator()->get('FormElementManager')->get(AssocierMetierTypeForm::class); $associerPosteForm = $manager->getServiceLocator()->get('FormElementManager')->get(AssocierPosteForm::class); $ficheMetierCreationForm = $manager->getServiceLocator()->get('FormElementManager')->get(FicheMetierCreationForm::class); $specificitePosteForm = $manager->getServiceLocator()->get('FormElementManager')->get(SpecificitePosteForm::class); /** @var FicheMetierController $controller */ $controller = new FicheMetierController(); $controller->setFicheMetierService($ficheMetierService); $controller->setAgentService($agentService); $controller->setActiviteService($activiteService); $controller->setAssocierAgentForm($associerAgentForm); $controller->setAssocierMetierTypeForm($associerMetierTypeForm); $controller->setAssocierPosteForm($associerPosteForm); $controller->setFicherMetierCreationForm($ficheMetierCreationForm); $controller->setSpecificitePosteForm($specificitePosteForm); return $controller; } Loading
module/Application/src/Application/Form/FicheMetier/AssocierAgentFormAwareTrait.php +27 Changes for module/Application/src/Application/Form/FicheMetier/AssocierAgentFormAwareTrait.php: 27 added lines, 0 removed lines. Original line number Diff line number Diff line <?php namespace Application\Form\FicheMetier; trait AssocierAgentFormAwareTrait { /** @var AssocierAgentForm $associerAgentForm */ private $associerAgentForm; /** * @return AssocierAgentForm */ public function getAssocierAgentForm() { return $this->associerAgentForm; } /** * @param AssocierAgentForm $associerAgentForm * @return AssocierAgentForm */ public function setAssocierAgentForm($associerAgentForm) { $this->associerAgentForm = $associerAgentForm; return $this->associerAgentForm; } } No newline at end of file
module/Application/src/Application/Form/FicheMetier/AssocierMetierTypeFormAwareTrait.php +29 Changes for module/Application/src/Application/Form/FicheMetier/AssocierMetierTypeFormAwareTrait.php: 29 added lines, 0 removed lines. Original line number Diff line number Diff line <?php namespace Application\Form\FicheMetier; trait AssocierMetierTypeFormAwareTrait { /** @var AssocierMetierTypeForm $associerMetierTypeForm */ private $associerMetierTypeForm; /** * @return AssocierMetierTypeForm */ public function getAssocierMetierTypeForm() { return $this->associerMetierTypeForm; } /** * @param AssocierMetierTypeForm $associerMetierTypeForm * @return AssocierMetierTypeForm */ public function setAssocierMetierTypeForm($associerMetierTypeForm) { $this->associerMetierTypeForm = $associerMetierTypeForm; return $this->associerMetierTypeForm; } } No newline at end of file
module/Application/src/Application/Form/FicheMetier/AssocierPosteFormAwareTrait.php +29 Changes for module/Application/src/Application/Form/FicheMetier/AssocierPosteFormAwareTrait.php: 29 added lines, 0 removed lines. Original line number Diff line number Diff line <?php namespace Application\Form\FicheMetier; trait AssocierPosteFormAwareTrait { /** @var AssocierPosteForm $associerPosteForm */ private $associerPosteForm; /** * @return AssocierPosteForm */ public function getAssocierPosteForm() { return $this->associerPosteForm; } /** * @param AssocierPosteForm $associerPosteForm * @return AssocierPosteForm */ public function setAssocierPosteForm($associerPosteForm) { $this->associerPosteForm = $associerPosteForm; return $this->associerPosteForm; } } No newline at end of file