| @@ 1451-1467 (lines=17) @@ | ||
| 1448 | * @param ChildConnection $l ChildConnection |
|
| 1449 | * @return $this|\Jalle19\StatusManager\Database\User The current object (for fluent API support) |
|
| 1450 | */ |
|
| 1451 | public function addConnection(ChildConnection $l) |
|
| 1452 | { |
|
| 1453 | if ($this->collConnections === null) { |
|
| 1454 | $this->initConnections(); |
|
| 1455 | $this->collConnectionsPartial = true; |
|
| 1456 | } |
|
| 1457 | ||
| 1458 | if (!$this->collConnections->contains($l)) { |
|
| 1459 | $this->doAddConnection($l); |
|
| 1460 | ||
| 1461 | if ($this->connectionsScheduledForDeletion and $this->connectionsScheduledForDeletion->contains($l)) { |
|
| 1462 | $this->connectionsScheduledForDeletion->remove($this->connectionsScheduledForDeletion->search($l)); |
|
| 1463 | } |
|
| 1464 | } |
|
| 1465 | ||
| 1466 | return $this; |
|
| 1467 | } |
|
| 1468 | ||
| 1469 | /** |
|
| 1470 | * @param ChildConnection $connection The ChildConnection object to add. |
|
| @@ 1624-1640 (lines=17) @@ | ||
| 1621 | * @param ChildConnection $l ChildConnection |
|
| 1622 | * @return $this|\Jalle19\StatusManager\Database\Instance The current object (for fluent API support) |
|
| 1623 | */ |
|
| 1624 | public function addConnection(ChildConnection $l) |
|
| 1625 | { |
|
| 1626 | if ($this->collConnections === null) { |
|
| 1627 | $this->initConnections(); |
|
| 1628 | $this->collConnectionsPartial = true; |
|
| 1629 | } |
|
| 1630 | ||
| 1631 | if (!$this->collConnections->contains($l)) { |
|
| 1632 | $this->doAddConnection($l); |
|
| 1633 | ||
| 1634 | if ($this->connectionsScheduledForDeletion and $this->connectionsScheduledForDeletion->contains($l)) { |
|
| 1635 | $this->connectionsScheduledForDeletion->remove($this->connectionsScheduledForDeletion->search($l)); |
|
| 1636 | } |
|
| 1637 | } |
|
| 1638 | ||
| 1639 | return $this; |
|
| 1640 | } |
|
| 1641 | ||
| 1642 | /** |
|
| 1643 | * @param ChildConnection $connection The ChildConnection object to add. |
|