/** * Add customer * * @param Customer $customer * @return CustomerGroup */ public function addCustomer(Customer $customer) { if (!$this->customers->contains($customer)) { $this->customers->add($customer); } return $this; }
/** * Add child * * @param Customer $child * @return Customer */ public function addChild(Customer $child) { if (!$this->hasChild($child)) { $child->setParent($this); $this->children->add($child); } return $this; }