本文整理汇总了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');
}
示例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);
}
示例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');
}