/** * @param \Magento\Catalog\Model\ResourceModel\Eav\Attribute $subject * @param \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute * @return \Magento\Catalog\Model\ResourceModel\Eav\Attribute * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterDelete(\Magento\Catalog\Model\ResourceModel\Eav\Attribute $subject, \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute) { if ($attribute->getIsUsedForPromoRules()) { $this->checkCatalogRulesAvailability($attribute->getAttributeCode()); } return $attribute; }
/** * {@inheritdoc} */ public function getIsUsedForPromoRules() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getIsUsedForPromoRules'); if (!$pluginInfo) { return parent::getIsUsedForPromoRules(); } else { return $this->___callPlugins('getIsUsedForPromoRules', func_get_args(), $pluginInfo); } }