/** * 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 getAttributeId() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAttributeId', array()); return parent::getAttributeId(); }