コード例 #1
0
ファイル: AbstractResource.php プロジェクト: aiesh/magento2
 /**
  * Check whether the attribute is Applicable to the object
  *
  * @param \Magento\Framework\Object $object
  * @param \Magento\Catalog\Model\Resource\Eav\Attribute $attribute
  * @return boolean
  */
 protected function _isApplicableAttribute($object, $attribute)
 {
     $applyTo = $attribute->getApplyTo();
     return (count($applyTo) == 0 || in_array($object->getTypeId(), $applyTo)) && $attribute->isInSet($object->getAttributeSetId());
 }