当前位置: 首页>>代码示例>>PHP>>正文


PHP BL::getInterfaceLanguage方法代码示例

本文整理汇总了PHP中BL::getInterfaceLanguage方法的典型用法代码示例。如果您正苦于以下问题:PHP BL::getInterfaceLanguage方法的具体用法?PHP BL::getInterfaceLanguage怎么用?PHP BL::getInterfaceLanguage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BL的用法示例。


在下文中一共展示了BL::getInterfaceLanguage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loadForm

 /**
  * Load the form
  */
 private function loadForm()
 {
     // gender dropdown values
     $genderValues = array('male' => SpoonFilter::ucfirst(BL::getLabel('Male')), 'female' => SpoonFilter::ucfirst(BL::getLabel('Female')));
     // birthdate dropdown values
     $days = range(1, 31);
     $months = SpoonLocale::getMonths(BL::getInterfaceLanguage());
     $years = range(date('Y'), 1900);
     // create form
     $this->frm = new BackendForm('add');
     // create elements
     $this->frm->addText('email');
     $this->frm->addPassword('password');
     $this->frm->addText('display_name');
     $this->frm->addText('first_name');
     $this->frm->addText('last_name');
     $this->frm->addText('city');
     $this->frm->addDropdown('gender', $genderValues);
     $this->frm->addDropdown('day', array_combine($days, $days));
     $this->frm->addDropdown('month', $months);
     $this->frm->addDropdown('year', array_combine($years, $years));
     $this->frm->addDropdown('country', SpoonLocale::getCountries(BL::getInterfaceLanguage()));
     // set default elements dropdowns
     $this->frm->getField('gender')->setDefaultElement('');
     $this->frm->getField('day')->setDefaultElement('');
     $this->frm->getField('month')->setDefaultElement('');
     $this->frm->getField('year')->setDefaultElement('');
     $this->frm->getField('country')->setDefaultElement('');
 }
开发者ID:nickmancol,项目名称:forkcms-rhcloud,代码行数:32,代码来源:add.php

示例2: loadForm

 /**
  * Load the form
  */
 private function loadForm()
 {
     $this->frm = new BackendForm('add');
     $this->frm->addText('title', null, null, 'inputText title', 'inputTextError title');
     $this->frm->addText('street');
     $this->frm->addText('number');
     $this->frm->addText('zip');
     $this->frm->addText('city');
     $this->frm->addDropdown('country', SpoonLocale::getCountries(BL::getInterfaceLanguage()), 'BE');
 }
开发者ID:nickmancol,项目名称:forkcms-rhcloud,代码行数:13,代码来源:add.php

示例3: loadForm

 /**
  * Load the form
  */
 private function loadForm()
 {
     $this->frm = new BackendForm('edit');
     $this->frm->addText('title', $this->record['title'], null, 'inputText title', 'inputTextError title');
     $this->frm->addEditor('text', $this->record['text']);
     $this->frm->addText('street', $this->record['street']);
     $this->frm->addText('number', $this->record['number']);
     $this->frm->addText('zip', $this->record['zip']);
     $this->frm->addText('city', $this->record['city']);
     $this->frm->addDropdown('country', SpoonLocale::getCountries(BL::getInterfaceLanguage()), $this->record['country']);
 }
开发者ID:richsage,项目名称:forkcms,代码行数:14,代码来源:edit.php

示例4: loadForm

 /**
  * Load the form
  *
  * @return	void
  */
 private function loadForm()
 {
     // gender dropdown values
     $genderValues = array('male' => ucfirst(BL::getLabel('Male')), 'female' => ucfirst(BL::getLabel('Female')));
     // birthdate dropdown values
     $days = range(1, 31);
     $months = SpoonLocale::getMonths(BL::getInterfaceLanguage());
     $years = range(date('Y'), 1900);
     // get settings
     $birthDate = BackendProfilesModel::getSetting($this->id, 'birth_date');
     // get day, month and year
     if ($birthDate) {
         list($birthYear, $birthMonth, $birthDay) = explode('-', $birthDate);
     } else {
         $birthDay = '';
         $birthMonth = '';
         $birthYear = '';
     }
     // create form
     $this->frm = new BackendForm('edit');
     // create elements
     $this->frm->addText('email', $this->profile['email']);
     $this->frm->addPassword('password');
     $this->frm->addText('display_name', $this->profile['display_name']);
     $this->frm->addText('first_name', BackendProfilesModel::getSetting($this->id, 'first_name'));
     $this->frm->addText('last_name', BackendProfilesModel::getSetting($this->id, 'last_name'));
     $this->frm->addText('city', BackendProfilesModel::getSetting($this->id, 'city'));
     $this->frm->addDropdown('gender', $genderValues, BackendProfilesModel::getSetting($this->id, 'gender'));
     $this->frm->addDropdown('day', array_combine($days, $days), $birthDay);
     $this->frm->addDropdown('month', $months, $birthMonth);
     $this->frm->addDropdown('year', array_combine($years, $years), (int) $birthYear);
     $this->frm->addDropdown('country', SpoonLocale::getCountries(BL::getInterfaceLanguage()), BackendProfilesModel::getSetting($this->id, 'country'));
     // set default elements dropdowns
     $this->frm->getField('gender')->setDefaultElement('');
     $this->frm->getField('day')->setDefaultElement('');
     $this->frm->getField('month')->setDefaultElement('');
     $this->frm->getField('year')->setDefaultElement('');
     $this->frm->getField('country')->setDefaultElement('');
 }
开发者ID:netconstructor,项目名称:forkcms,代码行数:44,代码来源:edit.php

示例5: getTimeAgo

 /**
  * Get time ago as a string for use in a datagrid
  *
  * @param int $timestamp The UNIX-timestamp to convert in a time-ago-string.
  * @return string
  */
 public static function getTimeAgo($timestamp)
 {
     $timestamp = (int) $timestamp;
     // get user setting for long dates
     $format = BackendAuthentication::getUser()->getSetting('datetime_format');
     // get the time ago as a string
     $timeAgo = SpoonDate::getTimeAgo($timestamp, BL::getInterfaceLanguage(), $format);
     return '<abbr title="' . SpoonDate::getDate($format, $timestamp, BL::getInterfaceLanguage()) . '">' . $timeAgo . '</abbr>';
 }
开发者ID:nickmancol,项目名称:forkcms-rhcloud,代码行数:15,代码来源:datagrid.php


注:本文中的BL::getInterfaceLanguage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。