/** * Flags a theme as being uninstalled. * @param string $name Theme code */ public function setUninstalled($code) { $history = Parameters::get('system::theme.history', []); if (array_key_exists($code, $history)) { unset($history[$code]); } Parameters::set('system::theme.history', $history); }
public function onDetachProject() { Parameters::set(['system::project.id' => null, 'system::project.name' => null, 'system::project.owner' => null]); Flash::success(Lang::get('system::lang.project.unbind_success')); return Redirect::to(Backend::url('system/updates')); }
/** * Sets the active theme. * The active theme code is stored in the database and overrides the configuration cms.activeTheme parameter. * @param string $code Specifies the active theme code. */ public static function setActiveTheme($code) { $paramKey = 'cms::theme.active'; Parameters::set($paramKey, $code); Cache::forget($paramKey); }
/** * Sets the active theme. * The active theme code is stored in the database and overrides the configuration cms.activeTheme parameter. * @param string $code Specifies the active theme code. */ public static function setActiveTheme($code) { self::resetCache(); Parameters::set(self::ACTIVE_KEY, $code); }
/** * Extracts the core after it has been downloaded. * @param string $hash * @param string $build * @return void */ public function extractCore($hash, $build) { $filePath = $this->getFilePath('core'); if (!Zip::extract($filePath, $this->baseDirectory)) { throw new ApplicationException(Lang::get('system::lang.zip.extract_failed', ['file' => $filePath])); } @unlink($filePath); // Database may fall asleep after this long process Db::reconnect(); Parameters::set(['system::core.hash' => $hash, 'system::core.build' => $build]); }
/** * Flags a theme as being installed, so it is not downloaded twice. * @param string $name Theme code */ public function setThemeInstalled($name) { $history = Parameters::get('system::theme.history', []); $history[$name] = Carbon::now()->timestamp; Parameters::set('system::theme.history', $history); }
/** * Sets the active theme. * The active theme code is stored in the database and overrides the configuration cms.activeTheme parameter. * @param string $code Specifies the active theme code. */ public static function setActiveTheme($code) { self::$activeThemeCache = false; self::$editThemeCache = false; $paramKey = 'cms::theme.active'; Parameters::set($paramKey, $code); Cache::forget($paramKey); }