Exemplo n.º 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;
 }
Exemplo n.º 2
0
 /**
  * @param $parent
  * @return self
  */
 public function setParent(AbstractModel $parent)
 {
     $this->parent = $parent;
     $this->setProductId($parent->getProductId());
     return $this;
 }
Exemplo n.º 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;
 }