Loading module/Application/src/Application/Entity/Db/Individu.php +2 −2 Changes for module/Application/src/Application/Entity/Db/Individu.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -383,9 +383,9 @@ class Individu implements HistoriqueAwareInterface, SourceAwareInterface * @return string * @deprecated Utiliser la class NomCompletFormatter. */ public function getNomComplet($avecCivilite = false, $avecNomPatro = false, $prenoms = false, $prenomfirst = false, $court = false) public function getNomComplet($avecCivilite = false, $avecNomPatro = false, $prenoms = false, $prenomfirst = false, $court = false, $patroPlutotQueUsuel=false) { $f = new NomCompletFormatter(true, $avecCivilite, $avecNomPatro, $prenomfirst, $prenoms, $court); $f = new NomCompletFormatter(true, $avecCivilite, $avecNomPatro, $prenomfirst, $prenoms, $court, $patroPlutotQueUsuel); return $f->filter($this); } Loading module/Application/src/Application/Filter/NomCompletFormatter.php +12 −2 Changes for module/Application/src/Application/Filter/NomCompletFormatter.php: 12 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ class NomCompletFormatter extends AbstractFilter protected $prenomDabord = false; protected $tousLesPrenoms = false; protected $court = false; protected $patroPlutotQueUsuel = false; /** * Constructeur. Loading @@ -31,7 +32,7 @@ class NomCompletFormatter extends AbstractFilter * @param bool $prenomDabord * @param bool $tousLesPrenoms */ public function __construct($nomEnMajuscule = true, $avecCivilite = false, $avecNomPatro = false, $prenomDabord = false, $tousLesPrenoms = false, $court = false) public function __construct($nomEnMajuscule = true, $avecCivilite = false, $avecNomPatro = false, $prenomDabord = false, $tousLesPrenoms = false, $court = false, $patroPlutotQueUsuel=false) { $this->nomEnMajuscule = $nomEnMajuscule; $this->avecCivilite = $avecCivilite; Loading @@ -39,7 +40,7 @@ class NomCompletFormatter extends AbstractFilter $this->prenomDabord = $prenomDabord; $this->tousLesPrenoms = $tousLesPrenoms; $this->court = $court; $this->patroPlutotQueUsuel = $patroPlutotQueUsuel; } /** Loading Loading @@ -113,13 +114,21 @@ class NomCompletFormatter extends AbstractFilter $nomPatro = ucfirst($this->nomEnMajuscule ? mb_strtoupper($nomPatro) : $nomPatro); $civilite = $this->avecCivilite ? $civilite : null; if ($this->patroPlutotQueUsuel && $nomPatro != '') { $parts = [ $civilite, $this->prenomDabord ? "$prenom $nomPatro" : "$nomPatro $prenom", ]; } else { $parts = [ $civilite, $this->prenomDabord ? "$prenom $nomUsuel" : "$nomUsuel $prenom", ]; } $result = implode(' ', array_filter($parts)); if (! $this->patroPlutotQueUsuel) { if ($this->avecNomPatro && $nomPatro !== $nomUsuel) { if ($this->court) { $result .= "-$nomPatro"; Loading @@ -127,6 +136,7 @@ class NomCompletFormatter extends AbstractFilter $result .= ", née $nomPatro"; } } } return $result; } Loading module/Application/src/Application/Service/These/TheseService.php +2 −6 Changes for module/Application/src/Application/Service/These/TheseService.php: 2 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ use Application\Entity\Db\Role; use Application\Entity\Db\Structure; use Application\Entity\Db\These; use Application\Entity\Db\VersionFichier; use Application\Filter\NomCompletFormatter; use Application\Notification\ValidationRdvBuNotification; use Application\Service\BaseService; use Application\Service\Etablissement\EtablissementServiceAwareTrait; Loading Loading @@ -278,13 +279,8 @@ class TheseService extends BaseService $pdcData->setTitre($these->getTitre()); $pdcData->setSpecialite($these->getLibelleDiscipline()); if ($these->getEtablissement()) $pdcData->setEtablissement($these->getEtablissement()->getLibelle()); // if ($these->getDoctorant()) $pdcData->setDoctorant($these->getDoctorant()->getIndividu()->getNomComplet(false, false, false, true, true)); if ($these->getDoctorant()) { $nom = $these->getDoctorant()->getIndividu()->getNomPatronymique(); if ($nom === null) $nom = $these->getDoctorant()->getIndividu()->getNomUsuel(); $nom = strtoupper($nom); $prenom = $these->getDoctorant()->getIndividu()->getPrenom1(); $pdcData->setDoctorant($prenom . " " . $nom); $pdcData->setDoctorant($these->getDoctorant()->getIndividu()->getNomComplet(false, false, false, true, true, true)); } if ($these->getDateSoutenance()) $pdcData->setDate($these->getDateSoutenance()->format("d/m/Y")); Loading Loading
module/Application/src/Application/Entity/Db/Individu.php +2 −2 Changes for module/Application/src/Application/Entity/Db/Individu.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -383,9 +383,9 @@ class Individu implements HistoriqueAwareInterface, SourceAwareInterface * @return string * @deprecated Utiliser la class NomCompletFormatter. */ public function getNomComplet($avecCivilite = false, $avecNomPatro = false, $prenoms = false, $prenomfirst = false, $court = false) public function getNomComplet($avecCivilite = false, $avecNomPatro = false, $prenoms = false, $prenomfirst = false, $court = false, $patroPlutotQueUsuel=false) { $f = new NomCompletFormatter(true, $avecCivilite, $avecNomPatro, $prenomfirst, $prenoms, $court); $f = new NomCompletFormatter(true, $avecCivilite, $avecNomPatro, $prenomfirst, $prenoms, $court, $patroPlutotQueUsuel); return $f->filter($this); } Loading
module/Application/src/Application/Filter/NomCompletFormatter.php +12 −2 Changes for module/Application/src/Application/Filter/NomCompletFormatter.php: 12 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ class NomCompletFormatter extends AbstractFilter protected $prenomDabord = false; protected $tousLesPrenoms = false; protected $court = false; protected $patroPlutotQueUsuel = false; /** * Constructeur. Loading @@ -31,7 +32,7 @@ class NomCompletFormatter extends AbstractFilter * @param bool $prenomDabord * @param bool $tousLesPrenoms */ public function __construct($nomEnMajuscule = true, $avecCivilite = false, $avecNomPatro = false, $prenomDabord = false, $tousLesPrenoms = false, $court = false) public function __construct($nomEnMajuscule = true, $avecCivilite = false, $avecNomPatro = false, $prenomDabord = false, $tousLesPrenoms = false, $court = false, $patroPlutotQueUsuel=false) { $this->nomEnMajuscule = $nomEnMajuscule; $this->avecCivilite = $avecCivilite; Loading @@ -39,7 +40,7 @@ class NomCompletFormatter extends AbstractFilter $this->prenomDabord = $prenomDabord; $this->tousLesPrenoms = $tousLesPrenoms; $this->court = $court; $this->patroPlutotQueUsuel = $patroPlutotQueUsuel; } /** Loading Loading @@ -113,13 +114,21 @@ class NomCompletFormatter extends AbstractFilter $nomPatro = ucfirst($this->nomEnMajuscule ? mb_strtoupper($nomPatro) : $nomPatro); $civilite = $this->avecCivilite ? $civilite : null; if ($this->patroPlutotQueUsuel && $nomPatro != '') { $parts = [ $civilite, $this->prenomDabord ? "$prenom $nomPatro" : "$nomPatro $prenom", ]; } else { $parts = [ $civilite, $this->prenomDabord ? "$prenom $nomUsuel" : "$nomUsuel $prenom", ]; } $result = implode(' ', array_filter($parts)); if (! $this->patroPlutotQueUsuel) { if ($this->avecNomPatro && $nomPatro !== $nomUsuel) { if ($this->court) { $result .= "-$nomPatro"; Loading @@ -127,6 +136,7 @@ class NomCompletFormatter extends AbstractFilter $result .= ", née $nomPatro"; } } } return $result; } Loading
module/Application/src/Application/Service/These/TheseService.php +2 −6 Changes for module/Application/src/Application/Service/These/TheseService.php: 2 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ use Application\Entity\Db\Role; use Application\Entity\Db\Structure; use Application\Entity\Db\These; use Application\Entity\Db\VersionFichier; use Application\Filter\NomCompletFormatter; use Application\Notification\ValidationRdvBuNotification; use Application\Service\BaseService; use Application\Service\Etablissement\EtablissementServiceAwareTrait; Loading Loading @@ -278,13 +279,8 @@ class TheseService extends BaseService $pdcData->setTitre($these->getTitre()); $pdcData->setSpecialite($these->getLibelleDiscipline()); if ($these->getEtablissement()) $pdcData->setEtablissement($these->getEtablissement()->getLibelle()); // if ($these->getDoctorant()) $pdcData->setDoctorant($these->getDoctorant()->getIndividu()->getNomComplet(false, false, false, true, true)); if ($these->getDoctorant()) { $nom = $these->getDoctorant()->getIndividu()->getNomPatronymique(); if ($nom === null) $nom = $these->getDoctorant()->getIndividu()->getNomUsuel(); $nom = strtoupper($nom); $prenom = $these->getDoctorant()->getIndividu()->getPrenom1(); $pdcData->setDoctorant($prenom . " " . $nom); $pdcData->setDoctorant($these->getDoctorant()->getIndividu()->getNomComplet(false, false, false, true, true, true)); } if ($these->getDateSoutenance()) $pdcData->setDate($these->getDateSoutenance()->format("d/m/Y")); Loading