/** * @return $this */ public function beforeDelete() { $this->_configDataResource->clearScopeData(\Magento\Store\Model\ScopeInterface::SCOPE_WEBSITES, $this->getId()); $this->_configDataResource->clearScopeData(\Magento\Store\Model\ScopeInterface::SCOPE_STORES, $this->getStoreIds()); return parent::beforeDelete(); }
/** * Protect delete from non admin area * * @return $this */ public function beforeDelete() { $this->_configDataResource->clearScopeData(ScopeInterface::SCOPE_STORES, $this->getId()); return parent::beforeDelete(); }