/** * Add account * * @param Account $account * @return AccountGroup */ public function addAccount(Account $account) { if (!$this->accounts->contains($account)) { $this->accounts->add($account); } return $this; }
/** * @param Account $child * * @return $this */ public function addChild(Account $child) { if (!$this->hasChild($child)) { $child->setParent($this); $this->children->add($child); } return $this; }
/** * @param Account $account * * @return $this */ public function addDefaultInAccount(Account $account) { if (!$this->defaultInAccounts->contains($account)) { $this->defaultInAccounts->add($account); $account->setDefaultContact($this); } return $this; }