Loading module/Application/src/Application/Controller/EntretienProfessionnelController.php +1 −2 Changes for module/Application/src/Application/Controller/EntretienProfessionnelController.php: 1 added line, 2 removed lines. Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ class EntretienProfessionnelController extends AbstractActionController { $agent = $this->getAgentService()->getAgent($agentId); $entretien = new EntretienProfessionnel(); $entretien->setAnnee($this->getAnneeScolaire()); if ($agent) $entretien->setAgent($agent); /** @var EntretienProfessionnelForm $form */ Loading Loading @@ -126,7 +125,7 @@ class EntretienProfessionnelController extends AbstractActionController { } return new ViewModel([ 'title' => 'Entretien professionnel '.$entretien->getAnnee().' de '.$entretien->getAgent()->getDenomination(), 'title' => 'Entretien professionnel '.$entretien->getCampagne()->getAnnee().' de '.$entretien->getAgent()->getDenomination(), 'entretien' => $entretien, 'validationAgent' => $validationAgent, 'validationResponsable' => $validationResponsable, Loading module/Application/src/Application/Entity/Db/EntretienProfessionnel.php +15 −6 Changes for module/Application/src/Application/Entity/Db/EntretienProfessionnel.php: 15 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -18,8 +18,8 @@ class EntretienProfessionnel implements HistoriqueAwareInterface { private $agent; /** @var User */ private $responsable; /** @var string */ private $annee; /** @var EntretienProfessionnelCampagne */ private $campagne; /** @var DateTime */ private $dateEntretien; /** @var FormulaireInstance */ Loading Loading @@ -79,16 +79,25 @@ class EntretienProfessionnel implements HistoriqueAwareInterface { */ public function getAnnee() { return $this->annee; if ($this->campagne === null) return "Aucune campagne"; return $this->campagne->getAnnee(); } /** * @param string $annee * @return EntretienProfessionnelCampagne */ public function getCampagne() { return $this->campagne; } /** * @param EntretienProfessionnelCampagne $campagne * @return EntretienProfessionnel */ public function setAnnee($annee) public function setCampagne($campagne) { $this->annee = $annee; $this->campagne = $campagne; return $this; } Loading module/Application/src/Application/Entity/Db/EntretienProfessionnelCampagne.php +10 −1 Changes for module/Application/src/Application/Entity/Db/EntretienProfessionnelCampagne.php: 10 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Application\Entity\Db; use DateTime; use Doctrine\Common\Collections\ArrayCollection; use UnicaenUtilisateur\Entity\HistoriqueAwareInterface; use UnicaenUtilisateur\Entity\HistoriqueAwareTrait; Loading @@ -19,6 +20,8 @@ class EntretienProfessionnelCampagne implements HistoriqueAwareInterface { private $dateFin; /** @var EntretienProfessionnelCampagne */ private $precede; /** @var ArrayCollection (EntretienProfessionnel) */ private $entretiens; /** * @return int Loading Loading @@ -100,7 +103,13 @@ class EntretienProfessionnelCampagne implements HistoriqueAwareInterface { return $this; } /** * @return EntretienProfessionnel[] */ public function getEntretiensProfessionnels() { return $this->entretiens->toArray(); } } No newline at end of file module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.EntretienProfessionnel.dcm.xml +4 −2 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.EntretienProfessionnel.dcm.xml: 4 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -11,10 +11,12 @@ </many-to-one> <many-to-one target-entity="UnicaenUtilisateur\Entity\Db\User" field="responsable"> <join-column name="responsable" referenced-column-name="id"/> <join-column name="responsable_id" referenced-column-name="id"/> </many-to-one> <field name="annee" type="string" length="16" column="annee" nullable="false"/> <many-to-one target-entity="Application\Entity\Db\EntretienProfessionnelCampagne" field="campagne"> <join-column name="campagne_id" referenced-column-name="id"/> </many-to-one> <many-to-one target-entity="Autoform\Entity\Db\FormulaireInstance" field="formulaireInstance"> <join-column name="formulaire_instance" referenced-column-name="id"/> Loading module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.EntretienProfessionnelCampagne.dcm.xml +2 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.EntretienProfessionnelCampagne.dcm.xml: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ <join-column name="precede_id" referenced-column-name="id"/> </many-to-one> <one-to-many target-entity="Application\Entity\Db\EntretienProfessionnel" mapped-by="campagne" field="entretiens"/> <!-- HISTORISATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <field name="histoCreation" type="datetime" column="histo_creation" nullable="false"/> <field name="histoModification" type="datetime" column="histo_modification" nullable="false"/> Loading Loading
module/Application/src/Application/Controller/EntretienProfessionnelController.php +1 −2 Changes for module/Application/src/Application/Controller/EntretienProfessionnelController.php: 1 added line, 2 removed lines. Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ class EntretienProfessionnelController extends AbstractActionController { $agent = $this->getAgentService()->getAgent($agentId); $entretien = new EntretienProfessionnel(); $entretien->setAnnee($this->getAnneeScolaire()); if ($agent) $entretien->setAgent($agent); /** @var EntretienProfessionnelForm $form */ Loading Loading @@ -126,7 +125,7 @@ class EntretienProfessionnelController extends AbstractActionController { } return new ViewModel([ 'title' => 'Entretien professionnel '.$entretien->getAnnee().' de '.$entretien->getAgent()->getDenomination(), 'title' => 'Entretien professionnel '.$entretien->getCampagne()->getAnnee().' de '.$entretien->getAgent()->getDenomination(), 'entretien' => $entretien, 'validationAgent' => $validationAgent, 'validationResponsable' => $validationResponsable, Loading
module/Application/src/Application/Entity/Db/EntretienProfessionnel.php +15 −6 Changes for module/Application/src/Application/Entity/Db/EntretienProfessionnel.php: 15 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -18,8 +18,8 @@ class EntretienProfessionnel implements HistoriqueAwareInterface { private $agent; /** @var User */ private $responsable; /** @var string */ private $annee; /** @var EntretienProfessionnelCampagne */ private $campagne; /** @var DateTime */ private $dateEntretien; /** @var FormulaireInstance */ Loading Loading @@ -79,16 +79,25 @@ class EntretienProfessionnel implements HistoriqueAwareInterface { */ public function getAnnee() { return $this->annee; if ($this->campagne === null) return "Aucune campagne"; return $this->campagne->getAnnee(); } /** * @param string $annee * @return EntretienProfessionnelCampagne */ public function getCampagne() { return $this->campagne; } /** * @param EntretienProfessionnelCampagne $campagne * @return EntretienProfessionnel */ public function setAnnee($annee) public function setCampagne($campagne) { $this->annee = $annee; $this->campagne = $campagne; return $this; } Loading
module/Application/src/Application/Entity/Db/EntretienProfessionnelCampagne.php +10 −1 Changes for module/Application/src/Application/Entity/Db/EntretienProfessionnelCampagne.php: 10 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Application\Entity\Db; use DateTime; use Doctrine\Common\Collections\ArrayCollection; use UnicaenUtilisateur\Entity\HistoriqueAwareInterface; use UnicaenUtilisateur\Entity\HistoriqueAwareTrait; Loading @@ -19,6 +20,8 @@ class EntretienProfessionnelCampagne implements HistoriqueAwareInterface { private $dateFin; /** @var EntretienProfessionnelCampagne */ private $precede; /** @var ArrayCollection (EntretienProfessionnel) */ private $entretiens; /** * @return int Loading Loading @@ -100,7 +103,13 @@ class EntretienProfessionnelCampagne implements HistoriqueAwareInterface { return $this; } /** * @return EntretienProfessionnel[] */ public function getEntretiensProfessionnels() { return $this->entretiens->toArray(); } } No newline at end of file
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.EntretienProfessionnel.dcm.xml +4 −2 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.EntretienProfessionnel.dcm.xml: 4 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -11,10 +11,12 @@ </many-to-one> <many-to-one target-entity="UnicaenUtilisateur\Entity\Db\User" field="responsable"> <join-column name="responsable" referenced-column-name="id"/> <join-column name="responsable_id" referenced-column-name="id"/> </many-to-one> <field name="annee" type="string" length="16" column="annee" nullable="false"/> <many-to-one target-entity="Application\Entity\Db\EntretienProfessionnelCampagne" field="campagne"> <join-column name="campagne_id" referenced-column-name="id"/> </many-to-one> <many-to-one target-entity="Autoform\Entity\Db\FormulaireInstance" field="formulaireInstance"> <join-column name="formulaire_instance" referenced-column-name="id"/> Loading
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.EntretienProfessionnelCampagne.dcm.xml +2 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.EntretienProfessionnelCampagne.dcm.xml: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ <join-column name="precede_id" referenced-column-name="id"/> </many-to-one> <one-to-many target-entity="Application\Entity\Db\EntretienProfessionnel" mapped-by="campagne" field="entretiens"/> <!-- HISTORISATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <field name="histoCreation" type="datetime" column="histo_creation" nullable="false"/> <field name="histoModification" type="datetime" column="histo_modification" nullable="false"/> Loading