Loading module/Application/src/Application/Controller/ExportController.php +2 −0 Original line number Diff line number Diff line Loading @@ -30,7 +30,9 @@ class ExportController extends AbstractController 'Date de naissance' => function (These $these) { return $these->getDoctorant()->getIndividu()->getDateNaissance(); }, 'Nationalité' => function (These $these) { return $these->getDoctorant()->getIndividu()->getNationalite(); }, 'Adresse électronique' => function (These $these) { return $these->getDoctorant()->getIndividu()->getEmail(); }, 'Adresse électronique personnelle' => function (These $these) { return $these->getDoctorant()->getIndividu()->getMailContact(); }, 'Numéro étudiant' => function (These $these) { return $this->sourceCodeStringHelper->removePrefixFrom($these->getDoctorant()->getSourceCode()); }, 'I.N.E.' => function (These $these) { return $these->getDoctorant()->getIndividu()->getIne(); }, //These 'Identifiant de la thèse' => function (These $these) { return $these->getSourceCode(); }, 'Titre' => function (These $these) { return $these->getTitre(); }, Loading module/Application/src/Application/Entity/Db/Individu.php +50 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ namespace Application\Entity\Db; use Application\Constants; use Application\Filter\NomCompletFormatter; use Doctrine\Common\Collections\ArrayCollection; use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenImport\Entity\Db\Interfaces\SourceAwareInterface; Loading Loading @@ -92,6 +93,20 @@ class Individu implements HistoriqueAwareInterface, SourceAwareInterface */ private $id; /** * @var ArrayCollection (mailContact) */ private $mailsConfirmations; /** * @var string */ private $ine; public function __construct() { $this->mailsConfirmations = new ArrayCollection(); } /** * @return string * @see supannId Loading Loading @@ -445,4 +460,39 @@ class Individu implements HistoriqueAwareInterface, SourceAwareInterface { return $this->id; } /** @return string */ public function getMailContact() { if (! $this->mailsConfirmations->isEmpty()) { /** @var MailConfirmation $mailConfirmation */ foreach ($this->mailsConfirmations as $mailConfirmation) { if ($mailConfirmation->getEtat() === MailConfirmation::CONFIRMER) { return $mailConfirmation->getEmail(); } } } return null; } /** * @return string */ public function getIne() { return $this->ine; } /** * @param string $ine * @return Individu */ public function setIne($ine) { $this->ine = $ine; return $this; } } No newline at end of file module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Individu.dcm.xml +2 −1 Original line number Diff line number Diff line Loading @@ -21,10 +21,11 @@ <field name="sourceCode" column="SOURCE_CODE" nullable="true"/> <one-to-many target-entity="Application\Entity\Db\MailConfirmation" mapped-by="individu" field="mailsConfirmations"/> <field name="histoCreation" type="datetime" column="HISTO_CREATION"/> <field name="histoDestruction" type="datetime" column="HISTO_DESTRUCTION" nullable="true"/> <field name="histoModification" type="datetime" column="HISTO_MODIFICATION"/> <many-to-one field="source" target-entity="Application\Entity\Db\Source"> <join-columns> <join-column name="SOURCE_ID" referenced-column-name="ID"/> Loading Loading
module/Application/src/Application/Controller/ExportController.php +2 −0 Original line number Diff line number Diff line Loading @@ -30,7 +30,9 @@ class ExportController extends AbstractController 'Date de naissance' => function (These $these) { return $these->getDoctorant()->getIndividu()->getDateNaissance(); }, 'Nationalité' => function (These $these) { return $these->getDoctorant()->getIndividu()->getNationalite(); }, 'Adresse électronique' => function (These $these) { return $these->getDoctorant()->getIndividu()->getEmail(); }, 'Adresse électronique personnelle' => function (These $these) { return $these->getDoctorant()->getIndividu()->getMailContact(); }, 'Numéro étudiant' => function (These $these) { return $this->sourceCodeStringHelper->removePrefixFrom($these->getDoctorant()->getSourceCode()); }, 'I.N.E.' => function (These $these) { return $these->getDoctorant()->getIndividu()->getIne(); }, //These 'Identifiant de la thèse' => function (These $these) { return $these->getSourceCode(); }, 'Titre' => function (These $these) { return $these->getTitre(); }, Loading
module/Application/src/Application/Entity/Db/Individu.php +50 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ namespace Application\Entity\Db; use Application\Constants; use Application\Filter\NomCompletFormatter; use Doctrine\Common\Collections\ArrayCollection; use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenImport\Entity\Db\Interfaces\SourceAwareInterface; Loading Loading @@ -92,6 +93,20 @@ class Individu implements HistoriqueAwareInterface, SourceAwareInterface */ private $id; /** * @var ArrayCollection (mailContact) */ private $mailsConfirmations; /** * @var string */ private $ine; public function __construct() { $this->mailsConfirmations = new ArrayCollection(); } /** * @return string * @see supannId Loading Loading @@ -445,4 +460,39 @@ class Individu implements HistoriqueAwareInterface, SourceAwareInterface { return $this->id; } /** @return string */ public function getMailContact() { if (! $this->mailsConfirmations->isEmpty()) { /** @var MailConfirmation $mailConfirmation */ foreach ($this->mailsConfirmations as $mailConfirmation) { if ($mailConfirmation->getEtat() === MailConfirmation::CONFIRMER) { return $mailConfirmation->getEmail(); } } } return null; } /** * @return string */ public function getIne() { return $this->ine; } /** * @param string $ine * @return Individu */ public function setIne($ine) { $this->ine = $ine; return $this; } } No newline at end of file
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Individu.dcm.xml +2 −1 Original line number Diff line number Diff line Loading @@ -21,10 +21,11 @@ <field name="sourceCode" column="SOURCE_CODE" nullable="true"/> <one-to-many target-entity="Application\Entity\Db\MailConfirmation" mapped-by="individu" field="mailsConfirmations"/> <field name="histoCreation" type="datetime" column="HISTO_CREATION"/> <field name="histoDestruction" type="datetime" column="HISTO_DESTRUCTION" nullable="true"/> <field name="histoModification" type="datetime" column="HISTO_MODIFICATION"/> <many-to-one field="source" target-entity="Application\Entity\Db\Source"> <join-columns> <join-column name="SOURCE_ID" referenced-column-name="ID"/> Loading