Skip to content
Snippets Groups Projects
Commit fd47e52a authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Merge branch 'feature-completion-extraction' into develop

parents 99b9b594 f139f200
No related branches found
No related tags found
No related merge requests found
......@@ -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(); },
......
......@@ -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;
......@@ -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
......@@ -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
......@@ -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"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment