private static function get_cache_manager() { if (self::$cache_manager === null) { self::$cache_manager = DataStoreFactory::get_ram_store(__CLASS__); } return self::$cache_manager; }
private function build_view() { $not_installed_langs = $this->get_not_installed_langs(); foreach ($not_installed_langs as $id) { try { $configuration = LangConfigurationManager::get($id); $this->view->assign_block_vars('langs_not_installed', array('C_WEBSITE' => $configuration->get_author_link() !== '', 'ID' => $id, 'NAME' => $configuration->get_name(), 'VERSION' => $configuration->get_version(), 'AUTHOR_NAME' => $configuration->get_author_name(), 'AUTHOR_WEBSITE' => $configuration->get_author_link(), 'AUTHOR_EMAIL' => $configuration->get_author_mail(), 'COMPATIBILITY' => $configuration->get_compatibility(), 'AUTHORIZATIONS' => Authorizations::generate_select(Lang::ACCES_LANG, array('r-1' => 1, 'r0' => 1, 'r1' => 1), array(2 => true), $id))); } catch (IOException $e) { } } $this->view->put_all(array('C_LANG_INSTALL' => count($not_installed_langs) > 0, 'L_ADD' => $this->lang['langs.add_lang'])); }
/** * @return LangConfiguration */ public function get_configuration() { return LangConfigurationManager::get($this->id); }