|
@@ -489,6 +489,7 @@ class Organization
|
|
|
{
|
|
{
|
|
|
if (!$this->access->contains($access)) {
|
|
if (!$this->access->contains($access)) {
|
|
|
$this->access[] = $access;
|
|
$this->access[] = $access;
|
|
|
|
|
+ $access->setOrganization($this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
@@ -496,7 +497,9 @@ class Organization
|
|
|
|
|
|
|
|
function removeAccess(Access $access): self
|
|
function removeAccess(Access $access): self
|
|
|
{
|
|
{
|
|
|
- $this->access->removeElement($access);
|
|
|
|
|
|
|
+ if ($this->access->removeElement($access)) {
|
|
|
|
|
+ $access->setOrganization(null);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
@@ -1896,7 +1899,6 @@ class Organization
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
function getNetwork(): Collection
|
|
function getNetwork(): Collection
|
|
|
{
|
|
{
|
|
|
return $this->network;
|
|
return $this->network;
|
|
@@ -1906,6 +1908,7 @@ class Organization
|
|
|
{
|
|
{
|
|
|
if (!$this->network->contains($network)) {
|
|
if (!$this->network->contains($network)) {
|
|
|
$this->network[] = $network;
|
|
$this->network[] = $network;
|
|
|
|
|
+ $network->setOrganization($this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
@@ -1913,7 +1916,9 @@ class Organization
|
|
|
|
|
|
|
|
function removeNetwork(NetworkOrganization $network): self
|
|
function removeNetwork(NetworkOrganization $network): self
|
|
|
{
|
|
{
|
|
|
- $this->network->removeElement($network);
|
|
|
|
|
|
|
+ if ($this->network->removeElement($network)) {
|
|
|
|
|
+ $network->setOrganization(null);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
@@ -1927,6 +1932,7 @@ class Organization
|
|
|
{
|
|
{
|
|
|
if (!$this->networkChild->contains($networkChild)) {
|
|
if (!$this->networkChild->contains($networkChild)) {
|
|
|
$this->networkChild[] = $networkChild;
|
|
$this->networkChild[] = $networkChild;
|
|
|
|
|
+ $networkChild->setParent($this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
@@ -1934,7 +1940,9 @@ class Organization
|
|
|
|
|
|
|
|
function removeNetworkChild(NetworkOrganization $networkChild): self
|
|
function removeNetworkChild(NetworkOrganization $networkChild): self
|
|
|
{
|
|
{
|
|
|
- $this->networkChild->removeElement($networkChild);
|
|
|
|
|
|
|
+ if ($this->networkChild->removeElement($networkChild)) {
|
|
|
|
|
+ $networkChild->setParent(null);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
@@ -1959,6 +1967,7 @@ class Organization
|
|
|
{
|
|
{
|
|
|
if (!$this->messages->contains($message)) {
|
|
if (!$this->messages->contains($message)) {
|
|
|
$this->messages[] = $message;
|
|
$this->messages[] = $message;
|
|
|
|
|
+ $message->setOrganization($this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
@@ -1966,7 +1975,9 @@ class Organization
|
|
|
|
|
|
|
|
function removeMessage(mixed $message): self
|
|
function removeMessage(mixed $message): self
|
|
|
{
|
|
{
|
|
|
- $this->messages->removeElement($message);
|
|
|
|
|
|
|
+ if ($this->messages->removeElement($message)) {
|
|
|
|
|
+ $message->setOrganization(null);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
@@ -1991,6 +2002,7 @@ class Organization
|
|
|
{
|
|
{
|
|
|
if (!$this->cotisationByYears->contains($cotisationByYear)) {
|
|
if (!$this->cotisationByYears->contains($cotisationByYear)) {
|
|
|
$this->cotisationByYears[] = $cotisationByYear;
|
|
$this->cotisationByYears[] = $cotisationByYear;
|
|
|
|
|
+ $cotisationByYear->setOrganization($this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
@@ -1998,7 +2010,9 @@ class Organization
|
|
|
|
|
|
|
|
function removeCotisationByYear(CotisationByYear $cotisationByYear): self
|
|
function removeCotisationByYear(CotisationByYear $cotisationByYear): self
|
|
|
{
|
|
{
|
|
|
- $this->cotisationByYears->removeElement($cotisationByYear);
|
|
|
|
|
|
|
+ if ($this->cotisationByYears->removeElement($cotisationByYear)) {
|
|
|
|
|
+ $cotisationByYear->setOrganization(null);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
@@ -2012,6 +2026,7 @@ class Organization
|
|
|
{
|
|
{
|
|
|
if (!$this->attendanceBookingReasons->contains($attendanceBookingReason)) {
|
|
if (!$this->attendanceBookingReasons->contains($attendanceBookingReason)) {
|
|
|
$this->attendanceBookingReasons[] = $attendanceBookingReason;
|
|
$this->attendanceBookingReasons[] = $attendanceBookingReason;
|
|
|
|
|
+ $attendanceBookingReason->setOrganization($this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
@@ -2019,7 +2034,9 @@ class Organization
|
|
|
|
|
|
|
|
function removeAttendanceBookingReason(AttendanceBookingReason $attendanceBookingReason): self
|
|
function removeAttendanceBookingReason(AttendanceBookingReason $attendanceBookingReason): self
|
|
|
{
|
|
{
|
|
|
- $this->attendanceBookingReasons->removeElement($attendanceBookingReason);
|
|
|
|
|
|
|
+ if ($this->attendanceBookingReasons->removeElement($attendanceBookingReason)) {
|
|
|
|
|
+ $attendanceBookingReason->setOrganization(null);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
@@ -2033,6 +2050,7 @@ class Organization
|
|
|
{
|
|
{
|
|
|
if (!$this->educationCurriculumPacks->contains($educationCurriculumPack)) {
|
|
if (!$this->educationCurriculumPacks->contains($educationCurriculumPack)) {
|
|
|
$this->educationCurriculumPacks[] = $educationCurriculumPack;
|
|
$this->educationCurriculumPacks[] = $educationCurriculumPack;
|
|
|
|
|
+ $educationCurriculumPack->setOrganization($this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
@@ -2040,7 +2058,9 @@ class Organization
|
|
|
|
|
|
|
|
function removeEducationCurriculumPack(Cycle $educationCurriculumPack): self
|
|
function removeEducationCurriculumPack(Cycle $educationCurriculumPack): self
|
|
|
{
|
|
{
|
|
|
- $this->educationCurriculumPacks->removeElement($educationCurriculumPack);
|
|
|
|
|
|
|
+ if ($this->educationCurriculumPacks->removeElement($educationCurriculumPack)) {
|
|
|
|
|
+ $educationCurriculumPack->setOrganization(null);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
@@ -2054,6 +2074,7 @@ class Organization
|
|
|
{
|
|
{
|
|
|
if (!$this->familyQuotientModels->contains($familyQuotientModel)) {
|
|
if (!$this->familyQuotientModels->contains($familyQuotientModel)) {
|
|
|
$this->familyQuotientModels[] = $familyQuotientModel;
|
|
$this->familyQuotientModels[] = $familyQuotientModel;
|
|
|
|
|
+ $familyQuotientModel->setOrganization($this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
@@ -2061,15 +2082,23 @@ class Organization
|
|
|
|
|
|
|
|
function removeFamilyQuotientModel(FamilyQuotientModel $familyQuotientModel): self
|
|
function removeFamilyQuotientModel(FamilyQuotientModel $familyQuotientModel): self
|
|
|
{
|
|
{
|
|
|
- $this->familyQuotientModels->removeElement($familyQuotientModel);
|
|
|
|
|
|
|
+ if ($this->familyQuotientModels->removeElement($familyQuotientModel)) {
|
|
|
|
|
+// $familyQuotientModel->setOrganization(null); // TODO: actuellement, pas nullable: conserver?
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ function getBillSchedules(): Collection
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->billSchedules;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
function addBillSchedule(BillSchedule $billSchedule): self
|
|
function addBillSchedule(BillSchedule $billSchedule): self
|
|
|
{
|
|
{
|
|
|
if (!$this->billSchedules->contains($billSchedule)) {
|
|
if (!$this->billSchedules->contains($billSchedule)) {
|
|
|
$this->billSchedules[] = $billSchedule;
|
|
$this->billSchedules[] = $billSchedule;
|
|
|
|
|
+ $billSchedule->setOrganization($this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
@@ -2077,7 +2106,9 @@ class Organization
|
|
|
|
|
|
|
|
function removeBillSchedule(BillSchedule $billSchedule): self
|
|
function removeBillSchedule(BillSchedule $billSchedule): self
|
|
|
{
|
|
{
|
|
|
- $this->billSchedules->removeElement($billSchedule);
|
|
|
|
|
|
|
+ if ($this->billSchedules->removeElement($billSchedule)) {
|
|
|
|
|
+// $billSchedule->setOrganization(null); // TODO: actuellement, pas nullable: conserver?
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|