@@ 1630-1638 (lines=9) @@ | ||
1627 | * |
|
1628 | * @return $this |
|
1629 | */ |
|
1630 | public function addDefaultInAccount(Account $account) |
|
1631 | { |
|
1632 | if (!$this->defaultInAccounts->contains($account)) { |
|
1633 | $this->defaultInAccounts->add($account); |
|
1634 | $account->setDefaultContact($this); |
|
1635 | } |
|
1636 | ||
1637 | return $this; |
|
1638 | } |
|
1639 | ||
1640 | /** |
|
1641 | * @param Account $account |
|
@@ 1645-1653 (lines=9) @@ | ||
1642 | * |
|
1643 | * @return $this |
|
1644 | */ |
|
1645 | public function removeDefaultInAccount(Account $account) |
|
1646 | { |
|
1647 | $this->defaultInAccounts->removeElement($account); |
|
1648 | if ($account->getDefaultContact() === $this) { |
|
1649 | $account->setDefaultContact(null); |
|
1650 | } |
|
1651 | ||
1652 | return $this; |
|
1653 | } |
|
1654 | ||
1655 | /** |
|
1656 | * @return Account[]|Collection |