當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。