Exemple #1
0
 /**
  * Protect delete from non admin area
  *
  * Register indexing event before delete store
  *
  * @return $this
  */
 protected function _beforeDelete()
 {
     \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\\Index\\Model\\Indexer')->logEvent($this, self::ENTITY, \Magento\Index\Model\Event::TYPE_DELETE);
     $this->_configDataResource->clearScopeData(\Magento\Store\Model\ScopeInterface::SCOPE_STORES, $this->getId());
     return parent::_beforeDelete();
 }
Exemple #2
0
 /**
  * @return $this
  */
 protected 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();
 }