当前位置: 首页>>代码示例>>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;未经允许,请勿转载。