Loading module/Application/src/Application/Entity/Db/Formation.php +68 −0 Changes for module/Application/src/Application/Entity/Db/Formation.php: 68 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Application\Entity\Db; use Doctrine\Common\Collections\ArrayCollection; use UnicaenApp\Entity\HistoriqueAwareTrait; class Formation { Loading @@ -16,6 +17,18 @@ class Formation { /** @var string */ private $lien; /** @var ArrayCollection */ private $applications; /** @var ArrayCollection */ private $missions; public function __construct() { $this->applications = new ArrayCollection(); $this->missions = new ArrayCollection(); } /** * @return int */ Loading Loading @@ -78,4 +91,59 @@ class Formation { return $this; } /** * @return Application[] */ public function getApplications() { return $this->applications->toArray(); } /** * @param Application $application * @return Formation */ public function addApplication($application) { $this->applications->add($application); return $this; } /** * @param Application $application * @return Formation */ public function removeApplication($application) { $this->applications->removeElement($application); return $this; } /** * @return Activite[] */ public function getMissions() { return $this->missions->toArray(); } /** * @param Activite $mission * @return Formation */ public function addMission($mission) { $this->missions->add($mission); return $this; } /** * @param Activite $mission * @return Formation */ public function removeMission($mission) { $this->missions->removeElement($mission); return $this; } } No newline at end of file module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Formation.dcm.xml +22 −0 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Formation.dcm.xml: 22 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -10,6 +10,28 @@ <field name="description" column="description" type="string" length="2048" /> <field name="lien" column="lien" type="string" length="1024" /> <many-to-many field="applications" target-entity="Application\Entity\Db\Application" inversed-by="application" fetch="LAZY"> <join-table name="application_formation"> <join-columns> <join-column name="formation_id" referenced-column-name="id"/> </join-columns> <inverse-join-columns> <join-column name="application_id" referenced-column-name="id"/> </inverse-join-columns> </join-table> </many-to-many> <many-to-many field="missions" target-entity="Application\Entity\Db\Activite" inversed-by="activite" fetch="LAZY"> <join-table name="activite_formation"> <join-columns> <join-column name="formation_id" referenced-column-name="id"/> </join-columns> <inverse-join-columns> <join-column name="activite_id" referenced-column-name="id"/> </inverse-join-columns> </join-table> </many-to-many> <field name="histoCreation" type="datetime" column="histo_creation" nullable="false"/> <field name="histoModification" type="datetime" column="histo_modification" nullable="false"/> <field name="histoDestruction" type="datetime" column="histo_destruction" nullable="true"/> Loading module/Application/src/Application/View/Helper/partial/fiche-metier-externe.phtml +33 −4 Changes for module/Application/src/Application/View/Helper/partial/fiche-metier-externe.phtml: 33 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -88,12 +88,41 @@ use Application\Entity\Db\FicheTypeExterne; </div> <div class="col-md-6"> <h4> Plan de formation </h4> <?php echo $fiche->getFicheType()->getConnaissancesFormation(); echo $fiche->getFicheType()->getCompetencesOperationnellesFormation(); echo $fiche->getFicheType()->getCompetencesComportementalesFormation(); echo $fiche->getFicheType()->getApplicationsFormation(); $formations = []; //formations liees aux missions actives foreach($fiche->getFicheType()->getActivites() as $activite) { $idActivite = $activite->getActivite()->getId(); if (array_search($idActivite, $activites) !== false) { foreach ($activite->getActivite()->getFormations() as $formation) { $formations[] = $formation->getLibelle(); } foreach ($activite->getActivite()->getApplications() as $application) { foreach ($application->getFormations() as $formation) { $formations[] = $formation->getLibelle(); } } } } //formation liees aux logiciels lies à la fiche metier foreach ($fiche->getFicheType()->getApplications() as $application) { foreach ($application->getFormations() as $formation) { $formations[] = $formation->getLibelle(); } } sort($formations); $formations = array_unique($formations); ?> <ul> <?php foreach($formations as $formation): ?> <li> <?php echo $formation; ?> </li> <?php endforeach; ?> </ul> </div> </div> <?php endif; ?> Loading module/Application/view/application/activite/index.phtml +10 −10 Changes for module/Application/view/application/activite/index.phtml: 10 added lines, 10 removed lines. Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ $canEffacer = $this->isAllowed(ActivitePrivileges::getResourceId(ActivitePri <thead> <tr> <th> Mission </th> <th> Applications </th> <!-- <th> Applications </th>--> <th> Modification </th> <th style="width:10rem;"> Action </th> </tr> Loading @@ -48,15 +48,15 @@ $canEffacer = $this->isAllowed(ActivitePrivileges::getResourceId(ActivitePri <td> <?php echo $activite->getLibelle(); ?> <br/> </td> <td> <small> <ul> <?php foreach ($activite->getApplications() as $application) : ?> <li> <?php echo $application->getLibelle(); ?></li> <?php endforeach; ?> </ul> </small> </td> <!-- <td>--> <!-- <small>--> <!-- <ul>--> <!-- --><?php //foreach ($activite->getApplications() as $application) : ?> <!-- <li> --><?php //echo $application->getLibelle(); ?><!--</li>--> <!-- --><?php //endforeach; ?> <!-- </ul>--> <!-- </small>--> <!-- </td>--> <td> <small> <?php echo $activite->getHistoModification()->format('d/m/Y'); ?> <br/> Loading module/Application/view/application/formation/afficher.phtml +32 −5 Changes for module/Application/view/application/formation/afficher.phtml: 32 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -19,17 +19,44 @@ use Application\Entity\Db\Formation; <?php else : ?> Aucune description. <?php endif; ?> <h3> Lien </h3> <?php if ($formation->getLien() !== null) : ?> <?php if ($formation->getLien() !== null && $formation->getLien() !== "") : ?> <a href="<?php echo $formation->getLien(); ?>"> <?php echo $formation->getLien(); ?> </a> <?php else : ?> Aucun lien. <?php endif; ?> <h3> Connaissances/Compétences liées </h3> TODO <h3> Applications liées </h3> TODO <h3> Connaissances/Compétences liées <span class="badge"> <?php echo count($formation->getMissions()); ?> </span> </h3> <?php if (!empty($formation->getMissions())): ?> <ul> <?php foreach ($formation->getMissions() as $mission) : ?> <li> <?php echo $mission->getLibelle(); ?> </li> <?php endforeach; ?> </ul> <?php else : ?> Aucune connaissance ou compétence liée à cette formation <?php endif; ?> <h3> Applications liées <span class="badge"> <?php echo count($formation->getApplications()); ?> </span> </h3> <?php if (!empty($formation->getApplications())): ?> <ul> <?php foreach ($formation->getApplications() as $application) : ?> <li> <?php echo $application->getLibelle(); ?> </li> <?php endforeach; ?> </ul> <?php else : ?> Aucune application liée à cette formation <?php endif; ?> </div> </div> Loading
module/Application/src/Application/Entity/Db/Formation.php +68 −0 Changes for module/Application/src/Application/Entity/Db/Formation.php: 68 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Application\Entity\Db; use Doctrine\Common\Collections\ArrayCollection; use UnicaenApp\Entity\HistoriqueAwareTrait; class Formation { Loading @@ -16,6 +17,18 @@ class Formation { /** @var string */ private $lien; /** @var ArrayCollection */ private $applications; /** @var ArrayCollection */ private $missions; public function __construct() { $this->applications = new ArrayCollection(); $this->missions = new ArrayCollection(); } /** * @return int */ Loading Loading @@ -78,4 +91,59 @@ class Formation { return $this; } /** * @return Application[] */ public function getApplications() { return $this->applications->toArray(); } /** * @param Application $application * @return Formation */ public function addApplication($application) { $this->applications->add($application); return $this; } /** * @param Application $application * @return Formation */ public function removeApplication($application) { $this->applications->removeElement($application); return $this; } /** * @return Activite[] */ public function getMissions() { return $this->missions->toArray(); } /** * @param Activite $mission * @return Formation */ public function addMission($mission) { $this->missions->add($mission); return $this; } /** * @param Activite $mission * @return Formation */ public function removeMission($mission) { $this->missions->removeElement($mission); return $this; } } No newline at end of file
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Formation.dcm.xml +22 −0 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Formation.dcm.xml: 22 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -10,6 +10,28 @@ <field name="description" column="description" type="string" length="2048" /> <field name="lien" column="lien" type="string" length="1024" /> <many-to-many field="applications" target-entity="Application\Entity\Db\Application" inversed-by="application" fetch="LAZY"> <join-table name="application_formation"> <join-columns> <join-column name="formation_id" referenced-column-name="id"/> </join-columns> <inverse-join-columns> <join-column name="application_id" referenced-column-name="id"/> </inverse-join-columns> </join-table> </many-to-many> <many-to-many field="missions" target-entity="Application\Entity\Db\Activite" inversed-by="activite" fetch="LAZY"> <join-table name="activite_formation"> <join-columns> <join-column name="formation_id" referenced-column-name="id"/> </join-columns> <inverse-join-columns> <join-column name="activite_id" referenced-column-name="id"/> </inverse-join-columns> </join-table> </many-to-many> <field name="histoCreation" type="datetime" column="histo_creation" nullable="false"/> <field name="histoModification" type="datetime" column="histo_modification" nullable="false"/> <field name="histoDestruction" type="datetime" column="histo_destruction" nullable="true"/> Loading
module/Application/src/Application/View/Helper/partial/fiche-metier-externe.phtml +33 −4 Changes for module/Application/src/Application/View/Helper/partial/fiche-metier-externe.phtml: 33 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -88,12 +88,41 @@ use Application\Entity\Db\FicheTypeExterne; </div> <div class="col-md-6"> <h4> Plan de formation </h4> <?php echo $fiche->getFicheType()->getConnaissancesFormation(); echo $fiche->getFicheType()->getCompetencesOperationnellesFormation(); echo $fiche->getFicheType()->getCompetencesComportementalesFormation(); echo $fiche->getFicheType()->getApplicationsFormation(); $formations = []; //formations liees aux missions actives foreach($fiche->getFicheType()->getActivites() as $activite) { $idActivite = $activite->getActivite()->getId(); if (array_search($idActivite, $activites) !== false) { foreach ($activite->getActivite()->getFormations() as $formation) { $formations[] = $formation->getLibelle(); } foreach ($activite->getActivite()->getApplications() as $application) { foreach ($application->getFormations() as $formation) { $formations[] = $formation->getLibelle(); } } } } //formation liees aux logiciels lies à la fiche metier foreach ($fiche->getFicheType()->getApplications() as $application) { foreach ($application->getFormations() as $formation) { $formations[] = $formation->getLibelle(); } } sort($formations); $formations = array_unique($formations); ?> <ul> <?php foreach($formations as $formation): ?> <li> <?php echo $formation; ?> </li> <?php endforeach; ?> </ul> </div> </div> <?php endif; ?> Loading
module/Application/view/application/activite/index.phtml +10 −10 Changes for module/Application/view/application/activite/index.phtml: 10 added lines, 10 removed lines. Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ $canEffacer = $this->isAllowed(ActivitePrivileges::getResourceId(ActivitePri <thead> <tr> <th> Mission </th> <th> Applications </th> <!-- <th> Applications </th>--> <th> Modification </th> <th style="width:10rem;"> Action </th> </tr> Loading @@ -48,15 +48,15 @@ $canEffacer = $this->isAllowed(ActivitePrivileges::getResourceId(ActivitePri <td> <?php echo $activite->getLibelle(); ?> <br/> </td> <td> <small> <ul> <?php foreach ($activite->getApplications() as $application) : ?> <li> <?php echo $application->getLibelle(); ?></li> <?php endforeach; ?> </ul> </small> </td> <!-- <td>--> <!-- <small>--> <!-- <ul>--> <!-- --><?php //foreach ($activite->getApplications() as $application) : ?> <!-- <li> --><?php //echo $application->getLibelle(); ?><!--</li>--> <!-- --><?php //endforeach; ?> <!-- </ul>--> <!-- </small>--> <!-- </td>--> <td> <small> <?php echo $activite->getHistoModification()->format('d/m/Y'); ?> <br/> Loading
module/Application/view/application/formation/afficher.phtml +32 −5 Changes for module/Application/view/application/formation/afficher.phtml: 32 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -19,17 +19,44 @@ use Application\Entity\Db\Formation; <?php else : ?> Aucune description. <?php endif; ?> <h3> Lien </h3> <?php if ($formation->getLien() !== null) : ?> <?php if ($formation->getLien() !== null && $formation->getLien() !== "") : ?> <a href="<?php echo $formation->getLien(); ?>"> <?php echo $formation->getLien(); ?> </a> <?php else : ?> Aucun lien. <?php endif; ?> <h3> Connaissances/Compétences liées </h3> TODO <h3> Applications liées </h3> TODO <h3> Connaissances/Compétences liées <span class="badge"> <?php echo count($formation->getMissions()); ?> </span> </h3> <?php if (!empty($formation->getMissions())): ?> <ul> <?php foreach ($formation->getMissions() as $mission) : ?> <li> <?php echo $mission->getLibelle(); ?> </li> <?php endforeach; ?> </ul> <?php else : ?> Aucune connaissance ou compétence liée à cette formation <?php endif; ?> <h3> Applications liées <span class="badge"> <?php echo count($formation->getApplications()); ?> </span> </h3> <?php if (!empty($formation->getApplications())): ?> <ul> <?php foreach ($formation->getApplications() as $application) : ?> <li> <?php echo $application->getLibelle(); ?> </li> <?php endforeach; ?> </ul> <?php else : ?> Aucune application liée à cette formation <?php endif; ?> </div> </div>