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


PHP DevblocksPlatform::getDateService方法代码示例

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


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

示例1: showTabGeneralAction

 function showTabGeneralAction()
 {
     $date_service = DevblocksPlatform::getDateService();
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl_path = $this->_TPL_PATH;
     $tpl->assign('path', $tpl_path);
     $worker = PortSensorApplication::getActiveWorker();
     $tpl->assign('worker', $worker);
     $assist_mode = intval(DAO_WorkerPref::get($worker->id, 'assist_mode', 1));
     $tpl->assign('assist_mode', $assist_mode);
     $keyboard_shortcuts = intval(DAO_WorkerPref::get($worker->id, 'keyboard_shortcuts', 1));
     $tpl->assign('keyboard_shortcuts', $keyboard_shortcuts);
     // Timezones
     $tpl->assign('timezones', $date_service->getTimezones());
     @($server_timezone = date_default_timezone_get());
     $tpl->assign('server_timezone', $server_timezone);
     // Languages
     $langs = DAO_Translation::getDefinedLangCodes();
     $tpl->assign('langs', $langs);
     $tpl->assign('selected_language', DAO_WorkerPref::get($worker->id, 'locale', 'en_US'));
     $tpl->display('file:' . $tpl_path . 'preferences/tabs/general.tpl');
 }
开发者ID:jstanden,项目名称:portsensor,代码行数:22,代码来源:preferences.php

示例2: modifier_devblocks_date

 static function modifier_devblocks_date($string, $format = null, $gmt = false)
 {
     if (empty($string)) {
         return '';
     }
     $date = DevblocksPlatform::getDateService();
     return $date->formatTime($format, $string, $gmt);
 }
开发者ID:jstanden,项目名称:devblocks,代码行数:8,代码来源:Devblocks.class.php

示例3: showGeneralAction

 function showGeneralAction()
 {
     $date_service = DevblocksPlatform::getDateService();
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl_path = $this->_TPL_PATH;
     $tpl->assign('path', $tpl_path);
     $worker = CerberusApplication::getActiveWorker();
     $tpl->assign('worker', $worker);
     $tour_enabled = intval(DAO_WorkerPref::get($worker->id, 'assist_mode', 1));
     $tpl->assign('assist_mode', $tour_enabled);
     $keyboard_shortcuts = intval(DAO_WorkerPref::get($worker->id, 'keyboard_shortcuts', 1));
     $tpl->assign('keyboard_shortcuts', $keyboard_shortcuts);
     $mail_inline_comments = DAO_WorkerPref::get($worker->id, 'mail_inline_comments', 1);
     $tpl->assign('mail_inline_comments', $mail_inline_comments);
     $mail_always_show_all = DAO_WorkerPref::get($worker->id, 'mail_always_show_all', 0);
     $tpl->assign('mail_always_show_all', $mail_always_show_all);
     $addresses = DAO_AddressToWorker::getByWorker($worker->id);
     $tpl->assign('addresses', $addresses);
     // Timezones
     $tpl->assign('timezones', $date_service->getTimezones());
     @($server_timezone = date_default_timezone_get());
     $tpl->assign('server_timezone', $server_timezone);
     // Languages
     $langs = DAO_Translation::getDefinedLangCodes();
     $tpl->assign('langs', $langs);
     $tpl->assign('selected_language', DAO_WorkerPref::get($worker->id, 'locale', 'en_US'));
     $tpl->display('file:' . $tpl_path . 'preferences/modules/general.tpl');
 }
开发者ID:Hildy,项目名称:cerb5,代码行数:28,代码来源:preferences.php


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