コード例 #1
0
 /**
  * Rewrite in order to clear configuration cache
  *
  * @return $this
  */
 public function afterDelete()
 {
     $this->_storeManager->reinitStores();
     parent::afterDelete();
     return $this;
 }
コード例 #2
0
ファイル: Store.php プロジェクト: mrbadao/magento-ce
 /**
  * Rewrite in order to clear configuration cache
  *
  * @return $this
  */
 public function afterDelete()
 {
     parent::afterDelete();
     $this->_configCacheType->clean();
     return $this;
 }
コード例 #3
0
ファイル: Rule.php プロジェクト: opexsw/magento2
 /**
  * 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();
 }
コード例 #4
0
ファイル: Store.php プロジェクト: rafaelstz/magento2
 /**
  * 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;
 }
コード例 #5
0
ファイル: Group.php プロジェクト: Doability/magento2dev
 /**
  * @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;
 }