當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UsersHelper::getTimeFormat方法代碼示例

本文整理匯總了PHP中UsersHelper::getTimeFormat方法的典型用法代碼示例。如果您正苦於以下問題:PHP UsersHelper::getTimeFormat方法的具體用法?PHP UsersHelper::getTimeFormat怎麽用?PHP UsersHelper::getTimeFormat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UsersHelper的用法示例。


在下文中一共展示了UsersHelper::getTimeFormat方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: switch

 if ($event['type'] == "task") {
     echo '<input type="hidden" name="due_date" value="' . $event['due_date'] . '" />';
 } else {
     echo '<input type="hidden" name="start_time" value="' . $event['start_time'] . '" />';
     echo '<input type="hidden" name="end_time" value="' . $event['end_time'] . '" />';
 }
 echo '<input type="hidden" name="event_type" value="' . $event['type'] . '" />';
 echo '<input type="hidden" name="repeats" value="' . $event['repeats'] . '" />';
 echo '<input type="hidden" name="type" value="single" />';
 echo '</div>';
 echo '</td>';
 $display_date = $event['type'] == "event" ? $event['start_time'] : $event['due_date'];
 if ($display_date == "") {
     $display_date = TextHelper::_('COBALT_NA');
 }
 echo '<td class="date"><small>' . DateHelper::formatDateString($display_date) . ' ' . DateHelper::formatTime($time, "(" . UsersHelper::getTimeFormat() . ")") . '</small></td>';
 switch ($event['association_type']) {
     case "company":
         echo "<td><i class='glyphicon glyphicon-briefcase'></i> <a href='" . RouteHelper::_('index.php?view=companies&layout=company&id=' . $event['company_id']) . "'>" . $event['company_name'] . "</a></td>";
         break;
     case "deal":
         echo "<td><i class='glyphicon glyphicon-tag'></i> <a href='" . RouteHelper::_('index.php?view=deals&layout=deal&id=' . $event['deal_id']) . "'>" . $event['deal_name'] . "</a></td>";
         break;
     case "person":
         echo "<td><i class='glyphicon glyphicon-user'></i> <a href='" . RouteHelper::_('index.php?view=people&layout=person&id=' . $event['person_id']) . "'>" . $event['person_first_name'] . " " . $event['person_last_name'] . "</a></td>";
         break;
     default:
         echo "<td>&nbsp;</td>";
         break;
 }
 echo '</tr>';
開發者ID:houzhenggang,項目名稱:cobalt,代碼行數:31,代碼來源:event_listings.php

示例2: ucwords

 echo $event['name'];
 echo '</a>';
 echo '<ul class="dropdown-menu" role="menu" aria-labelledby="event_menu_' . $event['id'] . '_link">';
 if ($event['completed'] == 1) {
     echo '<li><a href="javascript:void(0);" onclick="Calendar.markEventIncomplete(this)" >' . TextHelper::_('COBALT_MARK_INCOMPLETE') . '</a></li>';
 } else {
     echo '<li><a href="javascript:void(0);" onclick="Calendar.markEventComplete(this)" >' . TextHelper::_('COBALT_MARK_COMPLETE') . '</a></li>';
     echo '<li><a href="javascript:void(0);" onclick="Calendar.postponeEvent(this,1)" >' . TextHelper::_('COBALT_POSTPONE_1_DAY') . '</a></li>';
     echo '<li><a href="javascript:void(0);" onclick="Calendar.postponeEvent(this,7)" >' . TextHelper::_('COBALT_POSTPONE_7_DAYS') . '</a></li>';
 }
 $id = (array_key_exists('parent_id', $event) && $event['parent_id']) != 0 ? $event['parent_id'] : $event['id'];
 echo '<li><a href="javascript:void(0);" onclick="Calendar.editEvent(' . $id . ',\'' . $event['type'] . '\')" >' . TextHelper::_('COBALT_EDIT') . '</a></li>';
 echo '<li><a href="javascript:void(0);" onclick="Calendar.removeCalendarEvent(this)" >' . TextHelper::_('COBALT_DELETE') . '</a></li>';
 echo '</ul>';
 echo '</div></td>';
 echo '<td class="due_date_column">' . $due_date . ' ' . DateHelper::formatTime($time, "(" . UsersHelper::getTimeFormat() . ")") . '</td>';
 echo '<td>';
 if ($event['deal_name']) {
     echo '<a href=' . RouteHelper::_('index.php?view=deals&layout=deal&id=' . $event['deal_id']) . '>' . $event['deal_name'] . '</a><br />';
 }
 if ($event['company_name']) {
     echo '<a href=' . RouteHelper::_('index.php?view=companies&layout=company&id=' . $event['company_id']) . '>' . $event['company_name'] . '</a>';
 }
 if ($event['person_id']) {
     echo '<a href=' . RouteHelper::_('index.php?view=people&layout=person&id=' . $event['person_id']) . '>' . $event['person_first_name'] . ' ' . $event['person_last_name'] . '</a>';
 }
 echo '</td>';
 echo '<td>' . $event['owner_first_name'] . ' ' . $event['owner_last_name'] . '</td>';
 echo '<td>' . $event['assignee_first_name'] . ' ' . $event['assignee_last_name'] . '</td>';
 echo '<td>' . ucwords($event['category_name']) . '</td>';
 echo '<td class="contacts" ><a href="javascript:void(0);" onclick="Calendar.showEventContactsDialogModal(' . $event['id'] . ');"><img src="' . JURI::base() . 'src/Cobalt/media/images/card.png' . '"/></a></td>';
開發者ID:houzhenggang,項目名稱:cobalt,代碼行數:31,代碼來源:list.php


注:本文中的UsersHelper::getTimeFormat方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。