예제 #1
0
 /**
  * Check - attribute is YanNo type or not
  *
  * @param \XLite\Model\OrderItem\AttributeValue $attrValue Attribute value
  *
  * @return boolean
  */
 protected function isYesNo(\XLite\Model\OrderItem\AttributeValue $attrValue)
 {
     return $attrValue->getAttributeValue() instanceof \XLite\Model\AttributeValue\AttributeValueCheckbox;
 }
예제 #2
0
 /**
  * Get attribute value
  *
  * @param \XLite\Model\OrderItem\AttributeValue
  *
  * @return string|integer
  */
 protected function getAttributeId(\XLite\Model\OrderItem\AttributeValue $attrValue)
 {
     $attribute = $attrValue->getAttributeValue() ? $attrValue->getAttributeValue()->getAttribute() : null;
     if (!$attribute && $attrValue->getAttributeId()) {
         $attribute = \XLite\Core\Database::getRepo('XLite\\Model\\Attribute')->find($attrValue->getAttributeId());
     }
     return $attribute ? $attribute->getId() : $attrValue->getAttributeValueId();
 }
 /**
  * {@inheritDoc}
  */
 public function prepareEntityBeforeCommit($type)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'prepareEntityBeforeCommit', array($type));
     return parent::prepareEntityBeforeCommit($type);
 }