BxTasksConfig.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup Tasks Tasks
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. bx_import('BxDolInformer');
  12. class BxTasksConfig extends BxBaseModTextConfig
  13. {
  14. protected $_aProperties;
  15. function __construct($aModule)
  16. {
  17. parent::__construct($aModule);
  18. $aMenuItems2Methods = array (
  19. 'approve' => 'checkAllowedApprove',
  20. 'edit-task' => 'checkAllowedEdit',
  21. 'edit-task-state' => 'checkAllowedManage',
  22. 'delete-task' => 'checkAllowedDelete',
  23. );
  24. $this->CNF = array_merge($this->CNF, array (
  25. // module icon
  26. 'ICON' => 'tasks',
  27. // database tables
  28. 'TABLE_ENTRIES' => $aModule['db_prefix'] . 'tasks',
  29. 'TABLE_LISTS' => $aModule['db_prefix'] . 'lists',
  30. 'TABLE_CONTEXTS' => $aModule['db_prefix'] . 'contexts',
  31. 'TABLE_ASSIGNMENTS' => $aModule['db_prefix'] . 'assignments',
  32. 'TABLE_FILTERS' => $aModule['db_prefix'] . 'filters',
  33. 'TABLE_TIME' => $aModule['db_prefix'] . 'time',
  34. 'TABLE_TIME_TRACK' => $aModule['db_prefix'] . 'time_track',
  35. 'TABLE_TIMERS' => $aModule['db_prefix'] . 'timers',
  36. 'TABLE_PRE_LISTS' => $aModule['db_prefix'] . 'pre_lists',
  37. 'TABLE_PRE_VALUES' => $aModule['db_prefix'] . 'pre_values',
  38. 'TABLE_POLLS' => '',
  39. 'TABLE_ENTRIES_FULLTEXT' => 'title_text',
  40. // database fields
  41. 'FIELD_ID' => 'id',
  42. 'FIELD_AUTHOR' => 'author',
  43. 'FIELD_ADDED' => 'added',
  44. 'FIELD_CHANGED' => 'changed',
  45. 'FIELD_PUBLISHED' => 'published',
  46. 'FIELD_TITLE' => 'title',
  47. 'FIELD_TEXT' => 'text',
  48. 'FIELD_TEXT_ID' => 'post-text',
  49. 'FIELD_STICKERS' => 'stickers',
  50. 'FIELD_TYPE' => 'type',
  51. 'FIELD_PRIORITY' => 'priority',
  52. 'FIELD_ESTIMATE' => 'estimate',
  53. 'FIELD_STATE' => 'state',
  54. 'FIELD_CATEGORY' => 'cat',
  55. 'FIELD_MULTICAT' => 'multicat',
  56. 'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
  57. 'FIELD_CF' => 'cf',
  58. 'FIELD_COVER' => 'covers',
  59. 'FIELD_PHOTO' => 'pictures',
  60. 'FIELD_VIDEO' => 'videos',
  61. 'FIELD_FILE' => 'files',
  62. 'FIELD_THUMB' => 'thumb',
  63. 'FIELD_ATTACHMENTS' => 'attachments',
  64. 'FIELD_VIEWS' => 'views',
  65. 'FIELD_COMMENTS' => 'comments',
  66. 'FIELD_STATUS' => 'status',
  67. 'FIELD_STATUS_ADMIN' => 'status_admin',
  68. 'FIELD_LABELS' => 'labels',
  69. 'FIELD_TASKLIST' => 'tasks_list',
  70. 'FIELD_GH_ISSUE' => 'gh_issue',
  71. 'FIELD_GH_ISSUE_URL' => 'gh_issue_url',
  72. 'FIELD_INITIAL_MEMBERS' => 'initial_members',
  73. 'FIELD_DUE_DATE' => 'due_date',
  74. 'FIELD_EXPIRED' => 'expired',
  75. 'FIELD_COMPLETED' => 'completed',
  76. 'FIELD_ANONYMOUS' => 'anonymous',
  77. 'FIELD_ALLOW_COMMENTS' => 'allow_comments',
  78. 'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
  79. 'FIELDS_DELAYED_PROCESSING' => 'videos', // can be array of fields or comma separated string of field names
  80. // some params
  81. 'PARAM_MULTICAT_ENABLED' => true,
  82. 'PARAM_MULTICAT_AUTO_ACTIVATION_FOR_CATEGORIES' => 'bx_tasks_auto_activation_for_categories',
  83. 'PARAM_POLL_ENABLED' => false,
  84. // page URIs
  85. 'URI_VIEW_ENTRY' => 'view-task',
  86. 'URI_ENTRIES_BY_CONTEXT' => 'tasks-context',
  87. 'URI_ADD_ENTRY' => 'create-task',
  88. 'URI_EDIT_ENTRY' => 'edit-task',
  89. 'URI_MANAGE_COMMON' => 'tasks-manage',
  90. 'URL_HOME' => 'page.php?i=tasks-home',
  91. 'URL_POPULAR' => 'page.php?i=tasks-popular',
  92. 'URL_TOP' => 'page.php?i=tasks-top',
  93. 'URL_UPDATED' => 'page.php?i=tasks-updated',
  94. 'URL_MANAGE_COMMON' => 'page.php?i=tasks-manage',
  95. 'URL_MANAGE_ADMINISTRATION' => 'page.php?i=tasks-administration',
  96. 'URL_CONTEXT_VALUES' => 'page.php?i=tasks-context-values',
  97. // some params
  98. 'PARAM_AUTO_APPROVE' => 'bx_tasks_enable_auto_approve',
  99. 'PARAM_CHARS_SUMMARY' => 'bx_tasks_summary_chars',
  100. 'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_tasks_plain_summary_chars',
  101. 'PARAM_NUM_RSS' => 'bx_tasks_rss_num',
  102. 'PARAM_SEARCHABLE_FIELDS' => 'bx_tasks_searchable_fields',
  103. 'PARAM_PER_PAGE_BROWSE_SHOWCASE' => 'bx_tasks_per_page_browse_showcase',
  104. // objects
  105. 'OBJECT_STORAGE' => 'bx_tasks_covers',
  106. 'OBJECT_STORAGE_FILES' => 'bx_tasks_files',
  107. 'OBJECT_STORAGE_PHOTOS' => 'bx_tasks_photos',
  108. 'OBJECT_STORAGE_VIDEOS' => 'bx_tasks_videos',
  109. 'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_tasks_preview',
  110. 'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_tasks_gallery',
  111. 'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_tasks_cover',
  112. 'OBJECT_IMAGES_TRANSCODER_PREVIEW_FILES' => 'bx_tasks_preview_files',
  113. 'OBJECT_IMAGES_TRANSCODER_GALLERY_FILES' => 'bx_tasks_gallery_files',
  114. 'OBJECT_IMAGES_TRANSCODER_PREVIEW_PHOTOS' => 'bx_tasks_preview_photos',
  115. 'OBJECT_IMAGES_TRANSCODER_GALLERY_PHOTOS' => 'bx_tasks_gallery_photos',
  116. 'OBJECT_VIDEOS_TRANSCODERS' => array(
  117. 'poster' => 'bx_tasks_videos_poster',
  118. 'poster_preview' => 'bx_tasks_videos_poster_preview',
  119. 'mp4' => 'bx_tasks_videos_mp4',
  120. 'mp4_hd' => 'bx_tasks_videos_mp4_hd'
  121. ),
  122. 'OBJECT_VIDEO_TRANSCODER_HEIGHT' => '480px',
  123. 'OBJECT_REPORTS' => 'bx_tasks',
  124. 'OBJECT_REPORTS_TIME' => 'bx_tasks_time',
  125. 'OBJECT_VIEWS' => 'bx_tasks',
  126. 'OBJECT_VOTES' => 'bx_tasks',
  127. 'OBJECT_REACTIONS' => 'bx_tasks_reactions',
  128. 'OBJECT_SCORES' => 'bx_tasks',
  129. 'OBJECT_FAVORITES' => 'bx_tasks',
  130. 'OBJECT_FEATURED' => 'bx_tasks',
  131. 'OBJECT_COMMENTS' => 'bx_tasks',
  132. 'OBJECT_NOTES' => 'bx_tasks_notes',
  133. 'OBJECT_CATEGORY' => 'bx_tasks_cats',
  134. 'OBJECT_CONNECTION' => 'bx_tasks_assignments',
  135. 'OBJECT_PRIVACY_VIEW' => 'bx_tasks_allow_view_to',
  136. 'OBJECT_FORM_ENTRY' => 'bx_tasks',
  137. 'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_tasks_entry_view',
  138. 'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_tasks_entry_add',
  139. 'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_tasks_entry_edit',
  140. 'OBJECT_FORM_ENTRY_DISPLAY_EDIT_BODY' => 'bx_tasks_entry_edit_body',
  141. 'OBJECT_FORM_ENTRY_DISPLAY_EDIT_TYPE' => 'bx_tasks_entry_edit_type',
  142. 'OBJECT_FORM_ENTRY_DISPLAY_EDIT_PRIORITY' => 'bx_tasks_entry_edit_priority',
  143. 'OBJECT_FORM_ENTRY_DISPLAY_EDIT_ESTIMATE' => 'bx_tasks_entry_edit_estimate',
  144. 'OBJECT_FORM_ENTRY_DISPLAY_EDIT_DUE_DATE' => 'bx_tasks_entry_edit_due_date',
  145. 'OBJECT_FORM_ENTRY_DISPLAY_EDIT_STATE' => 'bx_tasks_entry_edit_state',
  146. 'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_tasks_entry_delete',
  147. 'OBJECT_FORM_LIST_ENTRY' => 'bx_tasks_list',
  148. 'OBJECT_FORM_LIST_ENTRY_DISPLAY_ADD' => 'bx_tasks_list_entry_add',
  149. 'OBJECT_FORM_LIST_ENTRY_DISPLAY_EDIT' => 'bx_tasks_list_entry_edit',
  150. 'OBJECT_FORM_CONTEXT' => 'bx_tasks_context',
  151. 'OBJECT_FORM_CONTEXT_DISPLAY_EDIT' => 'bx_tasks_context_edit',
  152. 'OBJECT_FORM_TIME' => 'bx_tasks_time',
  153. 'OBJECT_FORM_TIME_DISPLAY_ADD' => 'bx_tasks_time_add',
  154. 'OBJECT_FORM_TIME_DISPLAY_EDIT' => 'bx_tasks_time_edit',
  155. 'OBJECT_MENU_ENTRY_ATTACHMENTS' => 'bx_tasks_entry_attachments', // attachments menu in create/edit forms
  156. 'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_tasks_view', // actions menu on view entry page
  157. 'OBJECT_MENU_ACTIONS_VIEW_ENTRY_ALL' => 'bx_tasks_view_actions', // all actions menu on view entry page
  158. 'OBJECT_MENU_ACTIONS_MY_ENTRIES' => 'bx_tasks_my', // actions menu on my entries page
  159. 'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_tasks_view_submenu', // view entry submenu
  160. 'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'tasks-home', // first item in view entry submenu from main module submenu
  161. 'OBJECT_MENU_SNIPPET_META' => 'bx_tasks_snippet_meta', // menu for snippet meta info
  162. 'OBJECT_MENU_MANAGE_TOOLS' => 'bx_tasks_menu_manage_tools', //manage menu in content administration tools
  163. 'OBJECT_MENU_SUBMENU_VIEW_CONTEXT' => 'bx_tasks_view_context_submenu',
  164. 'OBJECT_MENU_USE_TOOLS_SUBMENU' => 'bx_tasks_use_tools_submenu',
  165. 'OBJECT_MENU_MANAGE_TOOLS_SUBMENU' => 'bx_tasks_manage_tools_submenu',
  166. 'OBJECT_MENU_MANAGE_TOOLS' => 'bx_tasks_menu_manage_tools', //manage item menu in content administration tools
  167. 'OBJECT_MENU_BROWSE' => 'bx_tasks_browse',
  168. 'OBJECT_GRID_ADMINISTRATION' => 'bx_tasks_administration',
  169. 'OBJECT_GRID_COMMON' => 'bx_tasks_common',
  170. 'OBJECT_GRID_TIME_ADMINISTRATION' => 'bx_tasks_time_administration',
  171. 'OBJECT_GRID_TIME_COMMON' => 'bx_tasks_time_common',
  172. 'OBJECT_GRID_TIME_CONTEXT_ADMINISTRATION' => 'bx_tasks_time_context_administration',
  173. 'OBJECT_GRID_TIME_CONTEXT_COMMON' => 'bx_tasks_time_context_common',
  174. 'OBJECT_GRID_PRE_VALUES' => 'bx_tasks_pre_values',
  175. 'OBJECT_UPLOADERS' => array('bx_tasks_simple', 'bx_tasks_html5'),
  176. 'OBJECT_CONTENT_INFO' => 'bx_tasks',
  177. 'OBJECT_CMTS_CONTENT_INFO' => 'bx_tasks_cmts',
  178. 'OBJECT_PRE_LIST_TYPES' => 'bx_tasks_types',
  179. 'OBJECT_PRE_LIST_STICKERS' => 'bx_tasks_stickers',
  180. 'OBJECT_PRE_LIST_PRIORITIES' => 'bx_tasks_priorities',
  181. 'OBJECT_PRE_LIST_ESTIMATES' => 'bx_tasks_estimates',
  182. 'OBJECT_PRE_LIST_STATES' => 'bx_tasks_states',
  183. 'BADGES_AVALIABLE' => true,
  184. 'COOKIE_SETTING_KEY' => 'bx_tasks_filters',
  185. // menu items which visibility depends on custom visibility checking
  186. 'MENU_ITEM_TO_METHOD' => array (
  187. 'bx_tasks_my' => array (
  188. 'create-task' => 'checkAllowedAdd',
  189. ),
  190. 'bx_tasks_view' => $aMenuItems2Methods,
  191. ),
  192. // informer messages
  193. 'INFORMERS' => array (
  194. 'approving' => array (
  195. 'name' => 'bx-tasks-approving',
  196. 'map' => array (
  197. 'pending' => array('msg' => '_bx_tasks_txt_msg_status_pending', 'type' => BX_INFORMER_ALERT),
  198. 'hidden' => array('msg' => '_bx_tasks_txt_msg_status_hidden', 'type' => BX_INFORMER_ERROR),
  199. ),
  200. ),
  201. 'processing' => array (
  202. 'name' => 'bx-tasks-processing',
  203. 'map' => array (
  204. 'awaiting' => array('msg' => '_bx_tasks_txt_processing_awaiting', 'type' => BX_INFORMER_ALERT),
  205. 'failed' => array('msg' => '_bx_tasks_txt_processing_failed', 'type' => BX_INFORMER_ERROR)
  206. ),
  207. ),
  208. 'scheduled' => array (
  209. 'name' => 'bx-tasks-scheduled',
  210. 'map' => array (
  211. 'awaiting' => array('msg' => '_bx_tasks_txt_scheduled_awaiting', 'type' => BX_INFORMER_ALERT),
  212. ),
  213. ),
  214. ),
  215. // some language keys
  216. 'T' => array (
  217. 'txt_sample_single' => '_bx_tasks_txt_sample_single',
  218. 'txt_sample_single_with_article' => '_bx_tasks_txt_sample_single_with_article',
  219. 'txt_sample_comment_single' => '_bx_tasks_txt_sample_comment_single',
  220. 'txt_sample_vote_single' => '_bx_tasks_txt_sample_vote_single',
  221. 'txt_sample_reaction_single' => '_bx_tasks_txt_sample_reaction_single',
  222. 'txt_sample_score_up_single' => '_bx_tasks_txt_sample_score_up_single',
  223. 'txt_sample_score_down_single' => '_bx_tasks_txt_sample_score_down_single',
  224. 'form_field_author' => '_bx_tasks_form_entry_input_author',
  225. 'form_field_covers_uploader_simple' => '_bx_tasks_form_entry_input_covers_uploader_simple_title',
  226. 'form_field_covers_uploader_html5' => '_bx_tasks_form_entry_input_covers_uploader_html5_title',
  227. 'grid_action_err_delete' => '_bx_tasks_grid_action_err_delete',
  228. 'grid_txt_account_manager' => '_bx_tasks_grid_txt_account_manager',
  229. 'filter_item_active' => '_bx_tasks_grid_filter_item_title_adm_active',
  230. 'filter_item_hidden' => '_bx_tasks_grid_filter_item_title_adm_hidden',
  231. 'filter_item_pending' => '_bx_tasks_grid_filter_item_title_adm_pending',
  232. 'filter_item_select_one_filter1' => '_bx_tasks_grid_filter_item_title_adm_select_one_filter1',
  233. 'filter_item_select_one_filter2' => '_bx_tasks_grid_filter_item_title_adm_select_one_filter2',
  234. 'filter_item_select_one_filter3' => '_bx_tasks_grid_filter_item_title_adm_select_one_filter3',
  235. 'menu_item_manage_my' => '_bx_tasks_menu_item_title_manage_my',
  236. 'menu_item_manage_all' => '_bx_tasks_menu_item_title_manage_all',
  237. 'txt_all_entries_by' => '_bx_tasks_txt_all_entries_by',
  238. 'txt_all_entries_in' => '_bx_tasks_txt_all_entries_in',
  239. 'txt_all_entries_by_author' => '_bx_tasks_page_title_browse_by_author',
  240. 'txt_all_entries_by_context' => '_bx_tasks_page_title_browse_by_context',
  241. 'txt_err_cannot_perform_action' => '_bx_tasks_txt_err_cannot_perform_action',
  242. ),
  243. ));
  244. $this->_aJsClasses = array_merge($this->_aJsClasses, [
  245. 'manage_tools' => 'BxTasksManageTools',
  246. 'categories' => 'BxDolCategories',
  247. 'tasks' => 'BxTasksView',
  248. 'time' => 'BxTasksTime',
  249. 'timer' => 'BxTasksTimer',
  250. 'pre_values' => 'BxTasksPreValues',
  251. ]);
  252. $this->_aJsObjects = array_merge($this->_aJsObjects, [
  253. 'manage_tools' => 'oBxTasksManageTools',
  254. 'categories' => 'oBxDolCategories',
  255. 'tasks' => 'oBxTasksView',
  256. 'time' => 'oBxTasksTime',
  257. 'timer' => 'oBxTasksTimer',
  258. 'pre_values' => 'oBxTasksPreValues',
  259. ]);
  260. $this->_aGridObjects = [
  261. 'common' => $this->CNF['OBJECT_GRID_COMMON'],
  262. 'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
  263. 'time_common' => $this->CNF['OBJECT_GRID_TIME_COMMON'],
  264. 'time_administration' => $this->CNF['OBJECT_GRID_TIME_ADMINISTRATION'],
  265. 'time_context_common' => $this->CNF['OBJECT_GRID_TIME_CONTEXT_COMMON'],
  266. 'time_context_administration' => $this->CNF['OBJECT_GRID_TIME_CONTEXT_ADMINISTRATION'],
  267. 'pre_values' => $this->CNF['OBJECT_GRID_PRE_VALUES'],
  268. ];
  269. $sPrefix = str_replace('_', '-', $this->_sName);
  270. $this->_aHtmlIds = array_merge($this->_aHtmlIds, [
  271. 'tasks' => $sPrefix . '-tasks',
  272. 'time_popup' => $sPrefix . '-time-popup',
  273. 'total_popup' => $sPrefix . '-total-popup',
  274. 'filter_popup' => $sPrefix . '-filter-popup',
  275. 'timer' => $sPrefix . '-timer-',
  276. 'timer_actions' => $sPrefix . '-timer-actions',
  277. 'pre_values_popup' => $sPrefix . '-pv-popup-',
  278. ]);
  279. $this->_bAttachmentsInTimeline = true;
  280. $this->_aProperties = [
  281. $this->CNF['FIELD_TYPE'],
  282. $this->CNF['FIELD_PRIORITY'],
  283. $this->CNF['FIELD_ESTIMATE'],
  284. $this->CNF['FIELD_DUE_DATE'],
  285. $this->CNF['FIELD_STATE']
  286. ];
  287. }
  288. public function isCompleted($iState)
  289. {
  290. return in_array($iState, [BX_TASKS_STATE_CANCELLED, BX_TASKS_STATE_DUPLICATE, BX_TASKS_STATE_DONE]);
  291. }
  292. public function getProperties()
  293. {
  294. return $this->_aProperties;
  295. }
  296. public function getTypeTitle($iValue)
  297. {
  298. $aItems = BxDolFormQuery::getDataItems($this->CNF['OBJECT_PRE_LIST_TYPES'], false, BX_DATA_VALUES_ALL);
  299. return $aItems[$iValue]['LKey'] ?? '';
  300. }
  301. public function getPriorityTitle($iValue)
  302. {
  303. $aItems = BxDolFormQuery::getDataItems($this->CNF['OBJECT_PRE_LIST_PRIORITIES'], false, BX_DATA_VALUES_ALL);
  304. return $aItems[$iValue]['LKey'] ?? '';
  305. }
  306. public function getEstimateTitle($iValue)
  307. {
  308. return $this->timeI2S($iValue);
  309. }
  310. public function getDueDateTitle($iValue)
  311. {
  312. return bx_process_output($iValue, BX_DATA_DATE_TS);
  313. }
  314. public function getStateTitle($iValue)
  315. {
  316. $aItems = BxDolFormQuery::getDataItems($this->CNF['OBJECT_PRE_LIST_STATES'], false, BX_DATA_VALUES_ALL);
  317. return $aItems[$iValue]['LKey'] ?? '';
  318. }
  319. public function timeA2I($a)
  320. {
  321. if(!$a || !is_array($a) || count($a) != 2)
  322. return 0;
  323. $iH = (int)($a[0] ?? 0);
  324. if($iH < 0)
  325. $iH = 0;
  326. $iM = (int)($a[1] ?? 0);
  327. if($iM < 0)
  328. $iM = 0;
  329. else if($iM > 59)
  330. $iM = 59;
  331. return 60 * $iH + $iM;
  332. }
  333. public function timeS2I($s)
  334. {
  335. if(strpos($s, ':') === false)
  336. return 0;
  337. return $this->timeA2I(explode(':', $s));
  338. }
  339. public function timeI2A($i, $bUseSeconds = false)
  340. {
  341. if(!$bUseSeconds) {
  342. $iH = intdiv($i, 60);
  343. return [$iH, $i - 60 * $iH];
  344. }
  345. $iH = intdiv($i, 3600);
  346. $iM = intdiv($i - 3600 * $iH, 60);
  347. return [$iH, $iM, $i - 3600 * $iH - 60 * $iM];
  348. }
  349. public function timeI2S($i)
  350. {
  351. list($iH, $iM) = $this->timeI2A($i);
  352. return sprintf("%02d", $iH) . ':' . sprintf("%02d", $iM);
  353. }
  354. }
  355. /** @} */