/** * Clone * * @return \XLite\Model\AEntity */ public function cloneEntity() { $newEntity = parent::cloneEntity(); if ($this->getAttributeOption()) { if ($this->getAttribute()->getProduct()) { $attributeOption = $this->getAttributeOption()->cloneEntity(); \XLite\Core\Database::getEM()->persist($attributeOption); } else { $attributeOption = $this->getAttributeOption(); } $newEntity->setAttributeOption($attributeOption); } return $newEntity; }
/** * Return modifiers * * @return array */ protected function getModifiers() { return \XLite\Model\AttributeValue\Multiple::getModifiers(); }
/** * Get weight modifier base value * * @return float */ protected function getModifierBaseWeight() { return $this->getVariant() ? $this->getVariant()->getClearWeight() : parent::getModifierBaseWeight(); }