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


PHP UTIL_DateTime::getTimezones方法代码示例

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


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

示例1: onPreferenceAddFormElement

 public function onPreferenceAddFormElement(BASE_CLASS_EventCollector $event)
 {
     $language = OW::getLanguage();
     $params = $event->getParams();
     $values = $params['values'];
     $fromElementList = array();
     $fromElement = new CheckboxField('mass_mailing_subscribe');
     $fromElement->setLabel($language->text('base', 'preference_mass_mailing_subscribe_label'));
     $fromElement->setDescription($language->text('base', 'preference_mass_mailing_subscribe_description'));
     if (isset($values['mass_mailing_subscribe'])) {
         $fromElement->setValue($values['mass_mailing_subscribe']);
     }
     $timeZoneSelect = new Selectbox("timeZoneSelect");
     $timeZoneSelect->setLabel($language->text('admin', 'timezone'));
     $timeZoneSelect->addOptions(UTIL_DateTime::getTimezones());
     $timeZoneSelect->setValue($values['timeZoneSelect']);
     $fromElementList[] = $timeZoneSelect;
     $fromElementList[] = $fromElement;
     $event->add($fromElementList);
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:20,代码来源:event_handler.php

示例2: __construct

 /**
  * Class constructor
  *
  */
 public function __construct()
 {
     parent::__construct('configSaveForm');
     $language = OW::getLanguage();
     $siteTitleField = new TextField('siteTitle');
     $siteTitleField->setRequired(true);
     $this->addElement($siteTitleField);
     $siteEmailField = new TextField('siteEmail');
     $siteEmailField->setRequired(true);
     $siteEmailField->addValidator(new EmailValidator());
     $this->addElement($siteEmailField);
     $taglineField = new TextField('tagline');
     $taglineField->setRequired(true);
     $this->addElement($taglineField);
     $descriptionField = new Textarea('description');
     $descriptionField->setRequired(true);
     $this->addElement($descriptionField);
     $dispalyCaptcha = new CheckboxField('enableCaptcha');
     $this->addElement($dispalyCaptcha);
     $timezoneField = new Selectbox('timezone');
     $timezoneField->setRequired(true);
     $timezoneField->setOptions(UTIL_DateTime::getTimezones());
     $this->addElement($timezoneField);
     $relativeTimeField = new CheckboxField('relativeTime');
     $this->addElement($relativeTimeField);
     $militaryTimeField = new CheckboxField('militaryTime');
     $this->addElement($militaryTimeField);
     // -- date format --
     $dateFieldFormat = new Selectbox("dateFieldFormat");
     $dateFieldFormat->setLabel($language->text('base', 'questions_config_date_field_format_label'));
     $dateFormatValue = OW::getConfig()->getValue('base', 'date_field_format');
     $dateFormatArray = array(BOL_QuestionService::DATE_FIELD_FORMAT_MONTH_DAY_YEAR, BOL_QuestionService::DATE_FIELD_FORMAT_DAY_MONTH_YEAR);
     $options = array();
     foreach ($dateFormatArray as $key) {
         $options[$key] = $language->text('base', 'questions_config_date_field_format_' . $key);
     }
     $dateFieldFormat->setOptions($options);
     $dateFieldFormat->setHasInvitation(false);
     $dateFieldFormat->setValue($dateFormatValue);
     $dateFieldFormat->setRequired();
     $this->addElement($dateFieldFormat);
     // -- date format --
     $currencyField = new Selectbox('currency');
     $currList = BOL_BillingService::getInstance()->getCurrencies();
     foreach ($currList as $key => $cur) {
         $currList[$key] = $key . ' (' . $cur . ')';
     }
     $currencyField->setOptions($currList);
     $currencyField->setLabel($language->text('admin', 'currency'));
     $currencyField->setRequired(true);
     $this->addElement($currencyField);
     //        $imagesAllowPicUpload = new CheckboxField('tf-allow-pic-upload');
     //
     //        $imagesAllowPicUpload->setLabel(OW::getLanguage()->text('base', 'tf_allow_pics'))
     //            ->setValue(OW::getConfig()->getValue('base', 'tf_allow_pic_upload'));
     //
     //        $this->addElement($imagesAllowPicUpload);
     //
     //        $imageMaxSizeField = new TextField('tf-max-image-size');
     //
     //        $imageMaxSizeField->setValue(OW::getConfig()->getValue('base', 'tf_max_pic_size'))
     //            ->setLabel(OW::getLanguage()->text('base', 'tf_max_img_size'))
     //            ->addValidator(new IntValidator())->setRequired();
     //
     //        $this->addElement($imageMaxSizeField);
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('admin', 'save_btn_label'));
     $this->addElement($submit);
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:74,代码来源:settings.php


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