private function configure_theme($theme) { ThemesManager::install($theme); }
private function install_theme($id_theme, $authorizations = array(), $activate = true) { ThemesManager::install($id_theme, $authorizations, $activate); $error = ThemesManager::get_error(); if ($error !== null) { $this->view->put('MSG', MessageHelper::display($error, MessageHelper::NOTICE, 10)); } else { $this->view->put('MSG', MessageHelper::display(LangLoader::get_message('process.success', 'status-messages-common'), MessageHelper::SUCCESS, 10)); } }
public function update_themes() { $active_themes_number = 0; foreach (ThemesManager::get_installed_themes_map() as $id => $theme) { if ($theme->get_configuration()->get_compatibility() == self::NEW_KERNEL_VERSION) { $active_themes_number++; } else { ThemesManager::uninstall($id); $this->add_information_to_file('theme ' . $id, 'has been uninstalled because : incompatible with new version'); } } if (empty($active_themes_number)) { ThemesManager::install('base'); $user_accounts_config = UserAccountsConfig::load(); $user_accounts_config->set_default_theme('base'); UserAccountsConfig::save(); } }