/** * Rewrite in order to clear configuration cache * * @return $this */ public function afterDelete() { $this->_storeManager->reinitStores(); parent::afterDelete(); return $this; }
/** * Rewrite in order to clear configuration cache * * @return $this */ public function afterDelete() { parent::afterDelete(); $this->_configCacheType->clean(); return $this; }
/** * After rule delete * Re-declared for dispatch tax_settings_change_after event * * @return $this */ public function afterDelete() { $this->_eventManager->dispatch('tax_settings_change_after'); return parent::afterDelete(); }
/** * Rewrite in order to clear configuration cache * * @return $this */ public function afterDelete() { parent::afterDelete(); $this->_configCacheType->clean(); if ($this->getId() === $this->getGroup()->getDefaultStoreId()) { $ids = $this->getGroup()->getStoreIds(); if (!empty($ids) && count($ids) > 1) { unset($ids[$this->getId()]); $defaultId = current($ids); } else { $defaultId = null; } $this->getGroup()->setDefaultStoreId($defaultId); $this->getGroup()->save(); } return $this; }
/** * @inheritdoc */ public function afterDelete() { $result = parent::afterDelete(); if ($this->getId() === $this->getWebsite()->getDefaultGroupId()) { $ids = $this->getWebsite()->getGroupIds(); if (!empty($ids) && count($ids) > 1) { unset($ids[$this->getId()]); $defaultId = current($ids); } else { $defaultId = null; } $this->getWebsite()->setDefaultGroupId($defaultId); $this->getWebsite()->save(); } return $result; }