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


PHP CTimeHelper::getBeautifyTimezoneList方法代码示例

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


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

示例1: _displayForm

 /**
  * Method to display the create / edit event's form.
  * Both views share the same template file.
  * */
 public function _displayForm($event)
 {
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     $my = CFactory::getUser();
     $config = CFactory::getConfig();
     $model = CFactory::getModel('events');
     $categories = $model->getCategories();
     $now = JFactory::getDate();
     $groupid = $jinput->get('groupid', '', 'INT');
     //J1.6 returns timezone as string, not integer offset.
     $systemOffset = new JDate('now', $mainframe->getCfg('offset'));
     $systemOffset = $systemOffset->getOffsetFromGMT(true);
     $editorType = $config->get('allowhtml') ? $config->get('htmleditor', 'none') : 'none';
     $editor = new CEditor($editorType);
     $totalEventCount = $model->getEventsCreationCount($my->id);
     if ($event->catid == null) {
         $event->catid = JRequest::getInt('categoryid', 0);
     }
     $event->startdatetime = $jinput->post->get('startdatetime', '00:01', 'NONE');
     $event->enddatetime = $jinput->post->get('enddatetime', '23:59', 'NONE');
     $timezones = CTimeHelper::getBeautifyTimezoneList();
     $helper = CEventHelper::getHandler($event);
     $startDate = $event->getStartDate(false);
     $endDate = $event->getEndDate(false);
     $repeatEndDate = $event->getRepeatEndDate();
     $dateSelection = CEventHelper::getDateSelection($startDate, $endDate);
     // Load category tree
     $cTree = CCategoryHelper::getCategories($categories);
     $lists['categoryid'] = CCategoryHelper::getSelectList('events', $cTree, $event->catid, true);
     $app = CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('createEvent'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     //to invite group members if this event creation belongs to a group and members is more than 1
     $showGroupMemberInvitation = false;
     if ($groupid) {
         $group = JTable::getInstance('Group', 'CTable');
         $group->load($groupid);
         $showGroupMemberInvitation = $group->getMembersCount() > 1 ? true : false;
     }
     $tmpl = new CTemplate();
     echo $tmpl->set('startDate', $startDate)->set('showGroupMemberInvitation', $showGroupMemberInvitation)->set('endDate', $endDate)->set('enableRepeat', $my->authorise('community.view', 'events.repeat'))->set('repeatEndDate', $repeatEndDate)->set('startHourSelect', $dateSelection->startHour)->set('endHourSelect', $dateSelection->endHour)->set('startMinSelect', $dateSelection->startMin)->set('endMinSelect', $dateSelection->endMin)->set('startAmPmSelect', $dateSelection->startAmPm)->set('endAmPmSelect', $dateSelection->endAmPm)->set('timezones', $timezones)->set('params', new CParameter($event->params))->set('config', $config)->set('systemOffset', $systemOffset)->set('lists', $lists)->set('categories', $categories)->set('event', $event)->set('editor', $editor)->set('helper', $helper)->set('now', $now->format('%Y-%m-%d'))->set('eventCreated', $totalEventCount)->set('eventcreatelimit', $config->get('eventcreatelimit'))->set('beforeFormDisplay', $beforeFormDisplay)->set('afterFormDisplay', $afterFormDisplay)->fetch('events.forms');
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:48,代码来源:view.html.php


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