Example #1
0
 /**
  * Return unique field name
  *
  * @param \XLite\Model\Attribute $attribute Attribute
  *
  * @return string
  */
 protected function getUniqueFieldName(\XLite\Model\Attribute $attribute)
 {
     $result = $attribute->getName() . ' (field:';
     $cnd = new \XLite\Core\CommonCell();
     $cnd->name = $attribute->getName();
     if ($attribute->getProduct()) {
         $result .= 'product';
     } elseif ($attribute->getProductClass()) {
         $result .= 'class';
     } else {
         $result .= 'global';
     }
     if ($attribute->getAttributeGroup()) {
         $result .= ' >>> ' . $attribute->getAttributeGroup()->getName();
     }
     $result .= ')';
     return $result;
 }
 /**
  * {@inheritDoc}
  */
 public function getProduct()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getProduct', array());
     return parent::getProduct();
 }