本文整理匯總了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');
}