Loading module/Application/src/Entity/Db/ElementPedagogique.php +36 −6 Changes for module/Application/src/Entity/Db/ElementPedagogique.php: 36 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -142,7 +142,7 @@ class ElementPedagogique implements HistoriqueAwareInterface, ResourceInterface, */ private $centreCoutEp; protected $tauxRemu = null; protected $tauxRemuEp = null; /** * @var \Application\Entity\Db\Effectifs Loading Loading @@ -262,14 +262,16 @@ class ElementPedagogique implements HistoriqueAwareInterface, ResourceInterface, return $this->libelle; } /** * Set un taux de rémunération * * @param TauxRemu $tauxRemu * @param TauxRemu|null $tauxRemuEp */ public function setTauxRemu(TauxRemu $tauxRemu) public function setTauxRemuEp(?TauxRemu $tauxRemuEp) { $this->tauxRemu = $tauxRemu; $this->tauxRemuEp = $tauxRemuEp; } Loading @@ -279,12 +281,13 @@ class ElementPedagogique implements HistoriqueAwareInterface, ResourceInterface, * * @return TauxRemu|null */ public function getTauxRemu(): ?TauxRemu public function getTauxRemuEp(): ?TauxRemu { return $this->tauxRemu; return $this->tauxRemuEp; } /** * Set tauxFoad * Loading Loading @@ -750,6 +753,33 @@ class ElementPedagogique implements HistoriqueAwareInterface, ResourceInterface, } /** * Add centreCoutEp * * @param \Paiement\Entity\Db\TauxRemu $tauxRemuEp * * @return ElementPedagogique */ public function addTauxRemuEp(\Paiement\Entity\Db\TauxRemu $tauxRemuEp) { $this->tauxRemuEp[] = $tauxRemuEp; return $this; } /** * Remove centreCoutEp * * @param \Paiement\Entity\Db\TauxRemu $tauxRemuEp */ public function removeTauxRemuEp(\Paiement\Entity\Db\TauxRemu $tauxRemuEp) { $this->centreCoutEp->removeElement($tauxRemuEp); } /** * Get centreCoutEp Loading module/Application/src/Entity/Db/Mapping/Application.Entity.Db.ElementPedagogique.dcm.xml +5 −10 Changes for module/Application/src/Entity/Db/Mapping/Application.Entity.Db.ElementPedagogique.dcm.xml: 5 added lines, 10 removed lines. Original line number Diff line number Diff line Loading @@ -37,6 +37,11 @@ <join-column name="DISCIPLINE_ID" referenced-column-name="ID"/> </join-columns> </many-to-one> <many-to-one field="tauxRemuEp" target-entity="Application\Entity\Db\TauxRemu"> <join-columns> <join-column name="TAUX_REMU_ID" referenced-column-name="ID"/> </join-columns> </many-to-one> <many-to-one field="source" target-entity="UnicaenImport\Entity\Db\Source"> <join-columns> <join-column name="SOURCE_ID" referenced-column-name="ID"/> Loading Loading @@ -113,16 +118,6 @@ </inverse-join-columns> </join-table> </many-to-many> <many-to-many field="typeHeures" target-entity="Application\Entity\Db\TypeHeures"> <join-table name="V_ELEMENT_TYPE_HEURES"> <join-columns> <join-column name="ELEMENT_PEDAGOGIQUE_ID" referenced-column-name="ID" on-delete="NO ACTION"/> </join-columns> <inverse-join-columns> <join-column name="TYPE_HEURES_ID" referenced-column-name="ID" on-delete="NO ACTION"/> </inverse-join-columns> </join-table> </many-to-many> <one-to-many field="centreCoutEp" target-entity="Application\Entity\Db\CentreCoutEp" mapped-by="elementPedagogique"/> </entity> </doctrine-mapping> No newline at end of file module/OffreFormation/src/Assertion/OffreDeFormationAssertion.php +0 −1 Changes for module/OffreFormation/src/Assertion/OffreDeFormationAssertion.php: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -269,7 +269,6 @@ class OffreDeFormationAssertion extends AbstractAssertion if ($annee->getId() < $anneeMinimaleImportOdf) { return true; } return !$source->getImportable(); } } No newline at end of file module/OffreFormation/src/Form/EtapeCentreCout/EtapeCentreCoutForm.php +0 −26 Changes for module/OffreFormation/src/Form/EtapeCentreCout/EtapeCentreCoutForm.php: 0 added lines, 26 removed lines. Original line number Diff line number Diff line Loading @@ -136,32 +136,6 @@ class EtapeCentreCoutForm extends AbstractForm /** * Should return an array specification compatible with * {@link Laminas\InputFilter\Factory::createInputFilter()}. * * @return array */ public function getInputFilterSpecification() { $elements = $this->getEtape()->getElementPedagogique(); $filters = []; foreach ($this->getTypesHeures() as $th) { $filters[$th->getCode()] = [ 'required' => false, ]; } foreach ($elements as $element) { $filters['EL' . $element->getId()] = [ 'required' => false, ]; } return $filters; } /** * Recherche, parmi les éléments de l'étape, des types d'heures distincts éligibles * Loading module/OffreFormation/src/Form/EtapeTauxRemu/ElementTauxRemuFieldset.php +28 −11 Changes for module/OffreFormation/src/Form/EtapeTauxRemu/ElementTauxRemuFieldset.php: 28 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace OffreFormation\Form\EtapeTauxRemu; use Application\Form\AbstractFieldset; use OffreFormation\Service\Traits\ElementPedagogiqueServiceAwareTrait; use Paiement\Service\TauxRemuServiceAwareTrait; use Application\Entity\Db\ElementPedagogique; use Paiement\Entity\Db\TauxRemu; Loading @@ -17,6 +18,7 @@ use Laminas\Hydrator\HydratorInterface; class ElementTauxRemuFieldset extends AbstractFieldset { use TauxRemuServiceAwareTrait; use ElementPedagogiqueServiceAwareTrait; /** * element pédagogique associé Loading @@ -39,24 +41,27 @@ class ElementTauxRemuFieldset extends AbstractFieldset { $hydrator = new ElementTauxRemusFieldsetHydrator(); $hydrator->setServiceTauxRemu($this->getServiceTauxRemu()); $hydrator->setServiceElementPedagogique($this->getServiceElementPedagogique()); $this->setHydrator($hydrator); $this->setAllowedObjectBindingClass(ElementPedagogique::class); } /** * Retourne la liste des taux de rémunération associés * * * @return TauxRemu|null */ public function getTauxRemu() public function getTauxRemus() { if (!isset($this->tauxRemus['tauxRemu'])) { $this->tauxRemus['tauxRemu'] = $this->getElementPedagogique()->getStructure()->getTauxRemu(); = $this->getServiceTauxRemu()->getTauxRemus(); } return $this->tauxRemus['tauxRemu']; } Loading @@ -82,7 +87,7 @@ class ElementTauxRemuFieldset extends AbstractFieldset $element = new Select('tauxRemu'); $element ->setLabel('taux') ->setValueOptions(['' => '(Aucun)'] + $this->getServiceTauxRemu()->getTauxRemus()) ->setValueOptions(['' => '(Aucun)'] + $this->getServiceTauxRemu()->formatTauxRemus($this->getTauxRemus())) ->setAttribute('class', 'taux-remus selectpicker') ->setAttribute('data-live-search', 'true'); Loading @@ -108,6 +113,7 @@ class ElementTauxRemuFieldset extends AbstractFieldset } /** * Retourne l'élément pédagogique courant (si l'objet a été préalablement associé) * Loading Loading @@ -145,7 +151,7 @@ class ElementTauxRemuFieldset extends AbstractFieldset class ElementTauxRemusFieldsetHydrator implements HydratorInterface { use TauxRemuServiceAwareTrait; use ElementPedagogiqueServiceAwareTrait; /** * Hydrate $object with the provided $data. Loading @@ -157,6 +163,12 @@ class ElementTauxRemusFieldsetHydrator implements HydratorInterface */ public function hydrate(array $data, $element) { $tauxRemu = null; if ($data['tauxRemu']) { $tauxRemu = $this->getServiceTauxRemu()->get((int)$data['tauxRemu']); } $element->setTauxRemuEp($tauxRemu); $this->getServiceElementPedagogique()->save($element); return $element; } Loading @@ -168,17 +180,22 @@ class ElementTauxRemusFieldsetHydrator implements HydratorInterface * * @param ElementPedagogique $element * * @return int * @return array */ public function extract($object): array public function extract($element): array { $data = []; $data = [ 'id' => $object->getId(), 'libelle' => $object->getLibelle(), 'tauxRemu' => $object->getTauxRemu()?->getId(), ]; if (($trEp = $element->getTauxRemuEp())) { $tr = $trEp->getTauxRemu(); if($tr){ $trId = $tr->getId(); $data['tauxRemu'] = $trId; }else{ $data['tauxRemu'] = null; } } return $data; } Loading Loading
module/Application/src/Entity/Db/ElementPedagogique.php +36 −6 Changes for module/Application/src/Entity/Db/ElementPedagogique.php: 36 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -142,7 +142,7 @@ class ElementPedagogique implements HistoriqueAwareInterface, ResourceInterface, */ private $centreCoutEp; protected $tauxRemu = null; protected $tauxRemuEp = null; /** * @var \Application\Entity\Db\Effectifs Loading Loading @@ -262,14 +262,16 @@ class ElementPedagogique implements HistoriqueAwareInterface, ResourceInterface, return $this->libelle; } /** * Set un taux de rémunération * * @param TauxRemu $tauxRemu * @param TauxRemu|null $tauxRemuEp */ public function setTauxRemu(TauxRemu $tauxRemu) public function setTauxRemuEp(?TauxRemu $tauxRemuEp) { $this->tauxRemu = $tauxRemu; $this->tauxRemuEp = $tauxRemuEp; } Loading @@ -279,12 +281,13 @@ class ElementPedagogique implements HistoriqueAwareInterface, ResourceInterface, * * @return TauxRemu|null */ public function getTauxRemu(): ?TauxRemu public function getTauxRemuEp(): ?TauxRemu { return $this->tauxRemu; return $this->tauxRemuEp; } /** * Set tauxFoad * Loading Loading @@ -750,6 +753,33 @@ class ElementPedagogique implements HistoriqueAwareInterface, ResourceInterface, } /** * Add centreCoutEp * * @param \Paiement\Entity\Db\TauxRemu $tauxRemuEp * * @return ElementPedagogique */ public function addTauxRemuEp(\Paiement\Entity\Db\TauxRemu $tauxRemuEp) { $this->tauxRemuEp[] = $tauxRemuEp; return $this; } /** * Remove centreCoutEp * * @param \Paiement\Entity\Db\TauxRemu $tauxRemuEp */ public function removeTauxRemuEp(\Paiement\Entity\Db\TauxRemu $tauxRemuEp) { $this->centreCoutEp->removeElement($tauxRemuEp); } /** * Get centreCoutEp Loading
module/Application/src/Entity/Db/Mapping/Application.Entity.Db.ElementPedagogique.dcm.xml +5 −10 Changes for module/Application/src/Entity/Db/Mapping/Application.Entity.Db.ElementPedagogique.dcm.xml: 5 added lines, 10 removed lines. Original line number Diff line number Diff line Loading @@ -37,6 +37,11 @@ <join-column name="DISCIPLINE_ID" referenced-column-name="ID"/> </join-columns> </many-to-one> <many-to-one field="tauxRemuEp" target-entity="Application\Entity\Db\TauxRemu"> <join-columns> <join-column name="TAUX_REMU_ID" referenced-column-name="ID"/> </join-columns> </many-to-one> <many-to-one field="source" target-entity="UnicaenImport\Entity\Db\Source"> <join-columns> <join-column name="SOURCE_ID" referenced-column-name="ID"/> Loading Loading @@ -113,16 +118,6 @@ </inverse-join-columns> </join-table> </many-to-many> <many-to-many field="typeHeures" target-entity="Application\Entity\Db\TypeHeures"> <join-table name="V_ELEMENT_TYPE_HEURES"> <join-columns> <join-column name="ELEMENT_PEDAGOGIQUE_ID" referenced-column-name="ID" on-delete="NO ACTION"/> </join-columns> <inverse-join-columns> <join-column name="TYPE_HEURES_ID" referenced-column-name="ID" on-delete="NO ACTION"/> </inverse-join-columns> </join-table> </many-to-many> <one-to-many field="centreCoutEp" target-entity="Application\Entity\Db\CentreCoutEp" mapped-by="elementPedagogique"/> </entity> </doctrine-mapping> No newline at end of file
module/OffreFormation/src/Assertion/OffreDeFormationAssertion.php +0 −1 Changes for module/OffreFormation/src/Assertion/OffreDeFormationAssertion.php: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -269,7 +269,6 @@ class OffreDeFormationAssertion extends AbstractAssertion if ($annee->getId() < $anneeMinimaleImportOdf) { return true; } return !$source->getImportable(); } } No newline at end of file
module/OffreFormation/src/Form/EtapeCentreCout/EtapeCentreCoutForm.php +0 −26 Changes for module/OffreFormation/src/Form/EtapeCentreCout/EtapeCentreCoutForm.php: 0 added lines, 26 removed lines. Original line number Diff line number Diff line Loading @@ -136,32 +136,6 @@ class EtapeCentreCoutForm extends AbstractForm /** * Should return an array specification compatible with * {@link Laminas\InputFilter\Factory::createInputFilter()}. * * @return array */ public function getInputFilterSpecification() { $elements = $this->getEtape()->getElementPedagogique(); $filters = []; foreach ($this->getTypesHeures() as $th) { $filters[$th->getCode()] = [ 'required' => false, ]; } foreach ($elements as $element) { $filters['EL' . $element->getId()] = [ 'required' => false, ]; } return $filters; } /** * Recherche, parmi les éléments de l'étape, des types d'heures distincts éligibles * Loading
module/OffreFormation/src/Form/EtapeTauxRemu/ElementTauxRemuFieldset.php +28 −11 Changes for module/OffreFormation/src/Form/EtapeTauxRemu/ElementTauxRemuFieldset.php: 28 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace OffreFormation\Form\EtapeTauxRemu; use Application\Form\AbstractFieldset; use OffreFormation\Service\Traits\ElementPedagogiqueServiceAwareTrait; use Paiement\Service\TauxRemuServiceAwareTrait; use Application\Entity\Db\ElementPedagogique; use Paiement\Entity\Db\TauxRemu; Loading @@ -17,6 +18,7 @@ use Laminas\Hydrator\HydratorInterface; class ElementTauxRemuFieldset extends AbstractFieldset { use TauxRemuServiceAwareTrait; use ElementPedagogiqueServiceAwareTrait; /** * element pédagogique associé Loading @@ -39,24 +41,27 @@ class ElementTauxRemuFieldset extends AbstractFieldset { $hydrator = new ElementTauxRemusFieldsetHydrator(); $hydrator->setServiceTauxRemu($this->getServiceTauxRemu()); $hydrator->setServiceElementPedagogique($this->getServiceElementPedagogique()); $this->setHydrator($hydrator); $this->setAllowedObjectBindingClass(ElementPedagogique::class); } /** * Retourne la liste des taux de rémunération associés * * * @return TauxRemu|null */ public function getTauxRemu() public function getTauxRemus() { if (!isset($this->tauxRemus['tauxRemu'])) { $this->tauxRemus['tauxRemu'] = $this->getElementPedagogique()->getStructure()->getTauxRemu(); = $this->getServiceTauxRemu()->getTauxRemus(); } return $this->tauxRemus['tauxRemu']; } Loading @@ -82,7 +87,7 @@ class ElementTauxRemuFieldset extends AbstractFieldset $element = new Select('tauxRemu'); $element ->setLabel('taux') ->setValueOptions(['' => '(Aucun)'] + $this->getServiceTauxRemu()->getTauxRemus()) ->setValueOptions(['' => '(Aucun)'] + $this->getServiceTauxRemu()->formatTauxRemus($this->getTauxRemus())) ->setAttribute('class', 'taux-remus selectpicker') ->setAttribute('data-live-search', 'true'); Loading @@ -108,6 +113,7 @@ class ElementTauxRemuFieldset extends AbstractFieldset } /** * Retourne l'élément pédagogique courant (si l'objet a été préalablement associé) * Loading Loading @@ -145,7 +151,7 @@ class ElementTauxRemuFieldset extends AbstractFieldset class ElementTauxRemusFieldsetHydrator implements HydratorInterface { use TauxRemuServiceAwareTrait; use ElementPedagogiqueServiceAwareTrait; /** * Hydrate $object with the provided $data. Loading @@ -157,6 +163,12 @@ class ElementTauxRemusFieldsetHydrator implements HydratorInterface */ public function hydrate(array $data, $element) { $tauxRemu = null; if ($data['tauxRemu']) { $tauxRemu = $this->getServiceTauxRemu()->get((int)$data['tauxRemu']); } $element->setTauxRemuEp($tauxRemu); $this->getServiceElementPedagogique()->save($element); return $element; } Loading @@ -168,17 +180,22 @@ class ElementTauxRemusFieldsetHydrator implements HydratorInterface * * @param ElementPedagogique $element * * @return int * @return array */ public function extract($object): array public function extract($element): array { $data = []; $data = [ 'id' => $object->getId(), 'libelle' => $object->getLibelle(), 'tauxRemu' => $object->getTauxRemu()?->getId(), ]; if (($trEp = $element->getTauxRemuEp())) { $tr = $trEp->getTauxRemu(); if($tr){ $trId = $tr->getId(); $data['tauxRemu'] = $trId; }else{ $data['tauxRemu'] = null; } } return $data; } Loading