public function settings() { $htmlEditors = WYSIWYG::htmlSelect(WYSIWYG::html()); $codeEditors = WYSIWYG::htmlSelect(WYSIWYG::code()); $dateFormats = Date::getFormats(); $availableLocales = Locale::getAvailable(); $this->setContent('system.settings', compact('htmlEditors', 'codeEditors', 'dateFormats', 'availableLocales')); }
public function run() { Meta::loadPackage('steps', 'validate'); if ($locale = $this->request->get('lang') and array_key_exists($locale, Locale::getAvailable())) { $this->session->set('installer_locale', $locale); } elseif ($locale = Locale::detectBrowser() and array_key_exists($locale, Locale::getAvailable())) { $this->session->set('installer_locale', $locale); } Lang::setLocale($this->session->get('installer_locale', Locale::getSystemDefault())); list($failed, $tests, $optional) = EnvironmentTester::check(); $moduleNamespace = \ModulesFileSystem::getModuleNameByNamespace() . '::'; $this->setContent('install', ['environment' => view("{$moduleNamespace}env", ['failed' => $failed, 'tests' => $tests, 'optional' => $optional]), 'data' => $this->installer->getParameters(), 'dbDrivers' => $this->installer->getAvailableDatabaseDrivers(), 'database' => $this->installer->getDatabaseParameters(), 'locales' => config('cms.locales'), 'selectedLocale' => Lang::locale(), 'dateFormats' => config('cms.date_format_list'), 'timezones' => Date::getTimezones(), 'cacheDrivers' => $this->installer->getAvailableCacheTypes(), 'sessionDrivers' => $this->installer->getAvailableSessionTypes()]); $this->templateScripts['FAILED'] = $failed; }
/** * @return string */ public function getLocale() { if (!empty($this->attributes['locale'])) { $locale = $this->attributes['locale']; if ($locale != Locale::DEFAULT_LOCALE) { return $locale; } } return Locale::getSystemDefault(); }