| @@ 1552-1560 (lines=9) @@ | ||
| 1549 | * |
|
| 1550 | * @return $this |
|
| 1551 | */ |
|
| 1552 | public function addDefaultInAccount(Account $account) |
|
| 1553 | { |
|
| 1554 | if (!$this->defaultInAccounts->contains($account)) { |
|
| 1555 | $this->defaultInAccounts->add($account); |
|
| 1556 | $account->setDefaultContact($this); |
|
| 1557 | } |
|
| 1558 | ||
| 1559 | return $this; |
|
| 1560 | } |
|
| 1561 | ||
| 1562 | /** |
|
| 1563 | * @param Account $account |
|
| @@ 1567-1575 (lines=9) @@ | ||
| 1564 | * |
|
| 1565 | * @return $this |
|
| 1566 | */ |
|
| 1567 | public function removeDefaultInAccount(Account $account) |
|
| 1568 | { |
|
| 1569 | $this->defaultInAccounts->removeElement($account); |
|
| 1570 | if ($account->getDefaultContact() === $this) { |
|
| 1571 | $account->setDefaultContact(null); |
|
| 1572 | } |
|
| 1573 | ||
| 1574 | return $this; |
|
| 1575 | } |
|
| 1576 | ||
| 1577 | /** |
|
| 1578 | * @return Account[]|Collection |
|