Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getApplyTo()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getApplyTo');
     if (!$pluginInfo) {
         return parent::getApplyTo();
     } else {
         return $this->___callPlugins('getApplyTo', func_get_args(), $pluginInfo);
     }
 }
 /**
  * Check whether the attribute is Applicable to the object
  *
  * @param \Magento\Framework\DataObject $object
  * @param \Magento\Catalog\Model\ResourceModel\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());
 }