/** * After saving the model, run any tasks for various configuration keys. * * @return void */ protected function afterSave() { switch ($this->key_name) { case 'FEATURED_KEYWORD': Product::SetFeaturedByKeyword($this->key_value); break; case 'LANGUAGES': $this->updateLanguages($this->key_value); break; case 'SEO_URL_CATEGORIES': Yii::app()->params['SEO_URL_CATEGORIES'] = $this->key_value; Product::convertSEO(); break; case 'AUTO_UPDATE': //This is only applicable to Hosting mode if (Yii::app()->params['LIGHTSPEED_HOSTING']) { $this->dummyUpdatefile((int) $this->key_value); } break; } parent::afterSave(); }