/** * {@inheritdoc} */ public function delete(\Magento\Eav\Api\Data\AttributeInterface $attribute) { try { $this->eavResource->delete($attribute); } catch (\Exception $e) { throw new StateException(__('Cannot delete attribute.')); } return true; }
/** * {@inheritdoc} */ public function delete(\Magento\Framework\Model\AbstractModel $object) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'delete'); if (!$pluginInfo) { return parent::delete($object); } else { return $this->___callPlugins('delete', func_get_args(), $pluginInfo); } }