Пример #1
0
 /**
  * Check attribute availability for super product creation
  *
  * @param  \Magento\Catalog\Model\Resource\Eav\Attribute $attribute
  * @return bool
  */
 public function canUseAttribute(\Magento\Catalog\Model\Resource\Eav\Attribute $attribute)
 {
     return $attribute->getIsGlobal() == \Magento\Catalog\Model\Resource\Eav\Attribute::SCOPE_GLOBAL && $attribute->getIsVisible() && $attribute->usesSource() && $attribute->getIsUserDefined();
 }