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