示例#1
0
 /**
  * Add customer
  *
  * @param Customer $customer
  * @return CustomerGroup
  */
 public function addCustomer(Customer $customer)
 {
     if (!$this->customers->contains($customer)) {
         $this->customers->add($customer);
     }
     return $this;
 }
示例#2
0
 /**
  * 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;
 }