Loading module/Oscar/src/Oscar/Factory/ActivityPcruInfoFromActivityFactory.php +2 −2 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ class ActivityPcruInfoFromActivityFactory return $activityPcruInfos; } public static function getHeaders() public function getHeaders() { return [ 'Objet' => "Intitulé de l'activité", Loading @@ -185,7 +185,7 @@ class ActivityPcruInfoFromActivityFactory 'TypeContrat' => '', 'Acronyme' => "Acronyme du projet de l'activité", 'ContratsAssocies' => 'off', 'ResponsableScientifique' => 'Nom de la personne ayant le rôle "Responsable scientifique"', 'ResponsableScientifique' => 'Nom de la personne ayant le rôle "'. $this->oscarConfigurationService->getPcruInChargeRole() . '"', 'EmployeurResponsableScientifique' => 'off', 'CoordinateurConsortium' => 'off', 'Partenaires' => 'off', Loading module/Oscar/src/Oscar/Service/PCRUService.php +11 −9 Original line number Diff line number Diff line Loading @@ -460,17 +460,18 @@ class PCRUService implements UseLoggerService, UseOscarConfigurationService, Use // Récupération des données $pcruInfos = $this->getPcruInfosActivity($activity); $preview = false; if (!$pcruInfos) { $preview = true; $factory = new ActivityPcruInfoFromActivityFactory( $this->getOscarConfigurationService(), $this->getEntityManager() ); if (!$pcruInfos) { $preview = true; $pcruInfos = $factory->createNew($activity); } $headers = ActivityPcruInfoFromActivityFactory::getHeaders(); $headers = $factory->getHeaders(); $datas = $pcruInfos->toArray($this->getEntityManager()); $pcruValidation = new PCRUValidator($this->getOscarConfigurationService(), $this->getEntityManager()); Loading Loading @@ -578,10 +579,7 @@ class PCRUService implements UseLoggerService, UseOscarConfigurationService, Use */ public function getResponsableScientifiques(Activity $activity): array { $roleStr = $this->getOscarConfigurationService()->getOptionalConfiguration( 'pcru_responsablescientifique', 'Responsable scientifique' ); $roleStr = $this->getOscarConfigurationService()->getPcruInChargeRole(); $out = []; /** @var ActivityPerson $per */ foreach ($activity->getPersonsDeep() as $per) { Loading @@ -608,6 +606,10 @@ class PCRUService implements UseLoggerService, UseOscarConfigurationService, Use return $factory; } public function getHeaders(){ return $this->getDataFactory()->getHeaders(); } protected function getPCRUDepotStrategy() { if ($this->pcruDepotStrategy === null) { Loading module/Oscar/src/Oscar/Utils/PCRUCvsFile.php +3 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ class PCRUCvsFile private $datas; private $pcruService; private $logs; private $headers; /** * PCRUCvsFile constructor. Loading @@ -31,6 +32,7 @@ class PCRUCvsFile $this->path = $directory == null ? $pcruService->getOscarConfigurationService()->getPcruDirectoryForUpload() : $directory; $this->datas = []; $this->logs = []; $this->headers = $pcruService->getHeaders(); } /** Loading Loading @@ -353,7 +355,7 @@ class PCRUCvsFile */ public function getHeaders(): array { return array_keys(ActivityPcruInfoFromActivityFactory::getHeaders()); return $this->headers; } public function printInSymfonyConsole(SymfonyStyle $symfonyStyle): void Loading Loading
module/Oscar/src/Oscar/Factory/ActivityPcruInfoFromActivityFactory.php +2 −2 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ class ActivityPcruInfoFromActivityFactory return $activityPcruInfos; } public static function getHeaders() public function getHeaders() { return [ 'Objet' => "Intitulé de l'activité", Loading @@ -185,7 +185,7 @@ class ActivityPcruInfoFromActivityFactory 'TypeContrat' => '', 'Acronyme' => "Acronyme du projet de l'activité", 'ContratsAssocies' => 'off', 'ResponsableScientifique' => 'Nom de la personne ayant le rôle "Responsable scientifique"', 'ResponsableScientifique' => 'Nom de la personne ayant le rôle "'. $this->oscarConfigurationService->getPcruInChargeRole() . '"', 'EmployeurResponsableScientifique' => 'off', 'CoordinateurConsortium' => 'off', 'Partenaires' => 'off', Loading
module/Oscar/src/Oscar/Service/PCRUService.php +11 −9 Original line number Diff line number Diff line Loading @@ -460,17 +460,18 @@ class PCRUService implements UseLoggerService, UseOscarConfigurationService, Use // Récupération des données $pcruInfos = $this->getPcruInfosActivity($activity); $preview = false; if (!$pcruInfos) { $preview = true; $factory = new ActivityPcruInfoFromActivityFactory( $this->getOscarConfigurationService(), $this->getEntityManager() ); if (!$pcruInfos) { $preview = true; $pcruInfos = $factory->createNew($activity); } $headers = ActivityPcruInfoFromActivityFactory::getHeaders(); $headers = $factory->getHeaders(); $datas = $pcruInfos->toArray($this->getEntityManager()); $pcruValidation = new PCRUValidator($this->getOscarConfigurationService(), $this->getEntityManager()); Loading Loading @@ -578,10 +579,7 @@ class PCRUService implements UseLoggerService, UseOscarConfigurationService, Use */ public function getResponsableScientifiques(Activity $activity): array { $roleStr = $this->getOscarConfigurationService()->getOptionalConfiguration( 'pcru_responsablescientifique', 'Responsable scientifique' ); $roleStr = $this->getOscarConfigurationService()->getPcruInChargeRole(); $out = []; /** @var ActivityPerson $per */ foreach ($activity->getPersonsDeep() as $per) { Loading @@ -608,6 +606,10 @@ class PCRUService implements UseLoggerService, UseOscarConfigurationService, Use return $factory; } public function getHeaders(){ return $this->getDataFactory()->getHeaders(); } protected function getPCRUDepotStrategy() { if ($this->pcruDepotStrategy === null) { Loading
module/Oscar/src/Oscar/Utils/PCRUCvsFile.php +3 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ class PCRUCvsFile private $datas; private $pcruService; private $logs; private $headers; /** * PCRUCvsFile constructor. Loading @@ -31,6 +32,7 @@ class PCRUCvsFile $this->path = $directory == null ? $pcruService->getOscarConfigurationService()->getPcruDirectoryForUpload() : $directory; $this->datas = []; $this->logs = []; $this->headers = $pcruService->getHeaders(); } /** Loading Loading @@ -353,7 +355,7 @@ class PCRUCvsFile */ public function getHeaders(): array { return array_keys(ActivityPcruInfoFromActivityFactory::getHeaders()); return $this->headers; } public function printInSymfonyConsole(SymfonyStyle $symfonyStyle): void Loading