| @@ 1566-1582 (lines=17) @@ | ||
| 1563 | * @param ChildConnection $l ChildConnection |
|
| 1564 | * @return $this|\Jalle19\StatusManager\Database\Instance The current object (for fluent API support) |
|
| 1565 | */ |
|
| 1566 | public function addConnection(ChildConnection $l) |
|
| 1567 | { |
|
| 1568 | if ($this->collConnections === null) { |
|
| 1569 | $this->initConnections(); |
|
| 1570 | $this->collConnectionsPartial = true; |
|
| 1571 | } |
|
| 1572 | ||
| 1573 | if (!$this->collConnections->contains($l)) { |
|
| 1574 | $this->doAddConnection($l); |
|
| 1575 | ||
| 1576 | if ($this->connectionsScheduledForDeletion and $this->connectionsScheduledForDeletion->contains($l)) { |
|
| 1577 | $this->connectionsScheduledForDeletion->remove($this->connectionsScheduledForDeletion->search($l)); |
|
| 1578 | } |
|
| 1579 | } |
|
| 1580 | ||
| 1581 | return $this; |
|
| 1582 | } |
|
| 1583 | ||
| 1584 | /** |
|
| 1585 | * @param ChildConnection $connection The ChildConnection object to add. |
|
| @@ 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. |
|