예제 #1
0
 /**
  * @param $parent
  * @return self
  */
 public function setParent(AbstractModel $parent)
 {
     $this->parent = $parent;
     $this->uomCode = $parent->getUomCode();
     $this->quantity = $parent->getQuantity();
     $this->productId = $parent->getProductId();
     return $this;
 }
예제 #2
0
 /**
  * @param $parent
  * @return self
  */
 public function setParent(AbstractModel $parent)
 {
     $this->parent = $parent;
     $this->setProductId($parent->getProductId());
     return $this;
 }
예제 #3
0
 /**
  * @param $parent
  * @return self
  */
 public function setParent(AbstractModel $parent)
 {
     $this->parent = $parent;
     if ($parent instanceof RelationalProduct) {
         $this->setProductId($parent->getProductId());
     } elseif ($parent instanceof RelationalChoice) {
         $this->setChoiceId($parent->getChoiceId());
     }
     return $this;
 }