/** * Rebuild cache files for all module settings */ public function actionRebuildCache() { $result = Cms::service('Cms/Settings/rebuildCache', array()); $this->message = 'Cache is updated for pages, categories, system and all modules settings.'; $this->redirect($this->createUrl('/BackOffice/admin/modules/dashboard', array('module' => 'Cms'))); }
public function actionSave() { //Make sure this action can be requested only by POST if ($this->IsPostBack) { // Check create a new article of edit an existing article $url = $this->createUrl('/BackOffice/admin/modules/edit', array('Id' => $this->post('Module[Id]'))); $result = Cms::service('BackOffice/Module/update', $_POST); if ($result->ReturnCode == ServiceResult::RETURN_SUCCESS) { //create config file $this->initConfigCache(); $moduleId = $this->post('Module[Id]', 0); if ($moduleId == 0) { $this->message = Yii::t('Module', 'MODULE_CREATE_SUCCESSFUL'); } else { $this->message = Yii::t('Module', 'MODULE_UPDATE_SUCCESSFUL'); } } // log error if ($result->ReturnCode != ServiceResult::RETURN_SUCCESS) { ErrorHandler::logErrors($result->ErrorMessages); } // redirect $this->redirect($url); } else { $this->redirect($this->createUrl('/BackOffice/admin/modules/all')); } }