예제 #1
0
 public function testUpdateStoredData()
 {
     $this->model->setData(['id' => 1000, 'name' => 'Test Name']);
     $this->assertEmpty($this->model->getStoredData());
     $this->model->afterLoad();
     $this->assertEquals($this->model->getData(), $this->model->getStoredData());
     $this->model->setData('value', 'Test Value');
     $this->model->afterSave();
     $this->assertEquals($this->model->getData(), $this->model->getStoredData());
     $this->model->afterDelete();
     $this->assertEmpty($this->model->getStoredData());
 }
예제 #2
0
파일: Store.php 프로젝트: kid17/magento2
 /**
  * Rewrite in order to clear configuration cache
  *
  * @return $this
  */
 public function afterDelete()
 {
     parent::afterDelete();
     $this->_configCacheType->clean();
     return $this;
 }
예제 #3
0
파일: Website.php 프로젝트: nja78/magento2
 /**
  * Rewrite in order to clear configuration cache
  *
  * @return $this
  */
 public function afterDelete()
 {
     $this->_storeManager->clearWebsiteCache($this->getId());
     parent::afterDelete();
     return $this;
 }
예제 #4
0
 /**
  * Update all relations after deleting theme
  *
  * @return $this
  */
 public function afterDelete()
 {
     $stagingVersion = $this->getStagingVersion();
     if ($stagingVersion) {
         $stagingVersion->delete();
     }
     $this->getCollection()->updateChildRelations($this);
     return parent::afterDelete();
 }
 /**
  * {@inheritdoc}
  *
  * {@inheritdoc}. In addition, it sets status 'invalidate' for config caches
  *
  * @return $this
  */
 public function afterDelete()
 {
     $this->cacheTypeList->invalidate(\Magento\Framework\App\Cache\Type\Config::TYPE_IDENTIFIER);
     return parent::afterDelete();
 }