本文整理汇总了PHP中TTi18n::getLanguageArray方法的典型用法代码示例。如果您正苦于以下问题:PHP TTi18n::getLanguageArray方法的具体用法?PHP TTi18n::getLanguageArray怎么用?PHP TTi18n::getLanguageArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TTi18n
的用法示例。
在下文中一共展示了TTi18n::getLanguageArray方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: TTnew
$pglf = TTnew('PolicyGroupListFactory');
$policy_group_options = $pglf->getByCompanyIDArray($current_company->getId());
$pclf = TTnew('PermissionControlListFactory');
$pclf->getByCompanyIdAndUserId($current_company->getId(), $filter_data['user_ids']);
$permission_control_user_map = $pclf->getUserToPermissionControlMapArrayByListFactory($pclf);
$ppslf = TTnew('PayPeriodScheduleListFactory');
$ppslf->getByCompanyIdAndUserId($current_company->getId(), $filter_data['user_ids']);
$pay_period_schedule_user_map = $ppslf->getUserToPayPeriodScheduleMapArrayByListFactory($ppslf);
$pglf = TTnew('PolicyGroupListFactory');
$pglf->getByCompanyIdAndUserId($current_company->getId(), $filter_data['user_ids']);
$policy_group_user_map = $pglf->getUserToPolicyGroupMapArrayByListFactory($pglf);
$crlf = TTnew('CurrencyListFactory');
$crlf->getByCompanyId($current_company->getId());
$currency_options = $crlf->getArrayByListFactory($crlf, FALSE, TRUE);
$upf = TTnew('UserPreferenceFactory');
$language_options = TTi18n::getLanguageArray();
$date_format_options = $upf->getOptions('date_format');
$time_format_options = $upf->getOptions('time_format');
$time_unit_format_options = $upf->getOptions('time_unit_format');
$timesheet_view_options = $upf->getOptions('timesheet_view');
$start_week_day_options = $upf->getOptions('start_week_day');
$time_zone_options = $upf->getOptions('time_zone');
//Make sure we account for wage permissions.
if ($permission->Check('wage', 'view') == TRUE) {
$wage_filter_data['permission_children_ids'] = $filter_data['user_ids'];
}
$uwlf = TTnew('UserWageListFactory');
$uwlf->getLastWageByUserIdAndDate($wage_filter_data['permission_children_ids'], TTDate::getTime());
if ($uwlf->getRecordCount() > 0) {
foreach ($uwlf as $uw_obj) {
$user_wage[$uw_obj->getUser()] = array('type_id' => $uw_obj->getType(), 'type' => Option::getByKey($uw_obj->getType(), $uw_obj->getOptions('type')), 'wage' => $uw_obj->getWage(), 'effective_date' => $uw_obj->getEffectiveDate());
示例2: setLanguage
function setLanguage($value)
{
$value = trim($value);
$language_options = TTi18n::getLanguageArray();
$key = Option::getByValue($value, $language_options);
if ($key !== FALSE) {
$value = $key;
}
if ($this->Validator->inArrayKey('language', $value, TTi18n::gettext('Incorrect language'), $language_options)) {
$this->data['language'] = $value;
return TRUE;
}
return FALSE;
}
示例3: Install
if (DEPLOYMENT_ON_DEMAND == FALSE and isset($config_vars['other']['installer_enabled']) and $config_vars['other']['installer_enabled'] == TRUE) {
//Installer is enabled, check to see if any companies have been created, if not redirect to installer automatically, as they skipped it somehow.
//Check if Company table exists first, incase the installer hasn't run at all, this avoids a SQL error.
$install_obj = new Install();
if ($install_obj->checkTableExists('company') == TRUE) {
$clf = TTnew('CompanyListFactory');
$clf->getAll();
if ($clf->getRecordCount() == 0) {
Redirect::Page(URLBuilder::getURL(array('external_installer' => 1), 'install/install.php'));
}
} else {
Redirect::Page(URLBuilder::getURL(array('external_installer' => 1), 'install/install.php'));
}
}
break;
}
$smarty->assign_by_ref('user_name', $user_name);
$smarty->assign_by_ref('password', $password);
$smarty->assign_by_ref('password_reset', $password_reset);
$smarty->assign('language_options', TTi18n::getLanguageArray());
if (isset($config_vars)) {
$smarty->assign_by_ref('config_vars', $config_vars);
}
if ($language == '') {
$language = TTi18n::getLanguageFromLocale();
} elseif (strlen($language) >= 4) {
$language = TTi18n::getLanguageFromLocale($language);
}
$smarty->assign('language', $language);
$smarty->assign_by_ref('validator', $validator);
$smarty->display('Login.tpl');
示例4: TTnew
$utlf = TTnew('UserTitleListFactory');
$user_titles = $utlf->getByCompanyIdArray($current_company->getId());
$user_data['title_options'] = $user_titles;
//Get Permission Groups
$pclf = TTnew('PermissionControlListFactory');
$pclf->getByCompanyId($current_company->getId());
$user_data['permission_control_options'] = $pclf->getArrayByListFactory($pclf, FALSE);
//Get pay period schedules
$ppslf = TTnew('PayPeriodScheduleListFactory');
$pay_period_schedules = $ppslf->getByCompanyIDArray($current_company->getId());
$user_data['pay_period_schedule_options'] = $pay_period_schedules;
$pglf = TTnew('PolicyGroupListFactory');
$policy_groups = $pglf->getByCompanyIDArray($current_company->getId());
$user_data['policy_group_options'] = $policy_groups;
$user_data['company'] = $current_company->getName();
$user_data['language_options'] = TTi18n::getLanguageArray();
$user_data['date_format_options'] = $upf->getOptions('date_format');
$user_data['other_date_format_options'] = $upf->getOptions('other_date_format');
$user_data['time_format_options'] = $upf->getOptions('time_format');
$user_data['time_unit_format_options'] = $upf->getOptions('time_unit_format');
$user_data['timesheet_view_options'] = $upf->getOptions('timesheet_view');
$user_data['start_week_day_options'] = $upf->getOptions('start_week_day');
$timezone_options = Misc::prependArray(array(-1 => '---'), $upf->getOptions('time_zone'));
$user_data['time_zone_options'] = $timezone_options;
//Get all Company Deductions for drop down box.
$cdlf = TTnew('CompanyDeductionListFactory');
$user_data['company_deduction_options'] = $cdlf->getByCompanyIdAndStatusIdArray($current_company->getId(), 10, FALSE);
$smarty->assign_by_ref('user_data', $user_data);
$smarty->assign_by_ref('data_saved', $data_saved);
break;
}
示例5: getPreLoginData
function getPreLoginData($api = NULL)
{
global $config_vars;
return array('primary_company_id' => PRIMARY_COMPANY_ID, 'base_url' => Environment::getBaseURL(), 'api_url' => Environment::getAPIURL($api), 'api_base_url' => Environment::getAPIBaseURL($api), 'api_json_url' => Environment::getAPIURL('json'), 'images_url' => Environment::getImagesURL(), 'powered_by_logo_enabled' => $this->isPoweredByLogoEnabled(), 'product_edition' => $this->getTTProductEdition(FALSE), 'product_edition_name' => $this->getTTProductEdition(TRUE), 'deployment_on_demand' => $this->getDeploymentOnDemand(), 'web_session_expire' => (isset($config_vars['other']['web_session_expire']) and $config_vars['other']['web_session_expire'] != '') ? (bool) $config_vars['other']['web_session_expire'] : FALSE, 'analytics_enabled' => $this->isAnalyticsEnabled(), 'registration_key' => $this->getRegistrationKey(), 'http_host' => $this->getHTTPHost(), 'application_version' => $this->getApplicationVersion(), 'is_logged_in' => $this->isLoggedIn(), 'language_options' => Misc::addSortPrefix(TTi18n::getLanguageArray()), 'language' => TTi18n::getLanguageFromLocale(TTi18n::getLocaleCookie()));
}