|
|
@@ -809,7 +809,7 @@ class OrganizationFactory
|
|
|
$withError = false;
|
|
|
|
|
|
try {
|
|
|
- $orphanPersons = $this->getOrphansToBePersons($organization);
|
|
|
+ $orphanPersons = $this->getFutureOrphanPersons($organization);
|
|
|
|
|
|
// On est obligé de supprimer manuellement les paramètres, car c'est l'entité Parameters qui est
|
|
|
// propriétaire de la relation Organization ↔ Parameters.
|
|
|
@@ -884,7 +884,7 @@ class OrganizationFactory
|
|
|
* @param Organization $organization
|
|
|
* @return array<Person>
|
|
|
*/
|
|
|
- protected function getOrphansToBePersons(Organization $organization): array
|
|
|
+ protected function getFutureOrphanPersons(Organization $organization): array
|
|
|
{
|
|
|
$orphans = [];
|
|
|
|
|
|
@@ -897,33 +897,9 @@ class OrganizationFactory
|
|
|
return $orphans;
|
|
|
}
|
|
|
|
|
|
- // TODO: à revoir, c'est du many to many
|
|
|
- // protected function removeTypeOfPractices(Organization $organization): void {
|
|
|
- // foreach ($organization->getTypeOfPractices() as $typeOfPractice) {
|
|
|
- // $organization->removeTypeOfPractice($typeOfPractice);
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // TODO: à revoir, c'est du many to many
|
|
|
- // protected function deleteContactPoints(Organization $organization): void
|
|
|
- // {
|
|
|
- // foreach ($organization->getContactPoints() as $contactPoint) {
|
|
|
- // $this->entityManager->remove($contactPoint);
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // TODO: à revoir, c'est du many to many
|
|
|
- // protected function deleteBankAccounts(Organization $organization): void {
|
|
|
- // foreach ($organization->getBankAccounts() as $bankAccount) {
|
|
|
- // $this->entityManager->remove($bankAccount);
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
-
|
|
|
protected function deleteTypo3Website(int $organizationId): void
|
|
|
{
|
|
|
- // TODO: implement
|
|
|
- // $this->typo3Service->deleteSite($organization->getId());
|
|
|
+ $this->typo3Service->hardDeleteSite($organizationId);
|
|
|
}
|
|
|
|
|
|
protected function switchDolibarrSocietyToProspect(Organization $organization): void
|