本文整理汇总了PHP中UsersHelper::getLoggedInUser方法的典型用法代码示例。如果您正苦于以下问题:PHP UsersHelper::getLoggedInUser方法的具体用法?PHP UsersHelper::getLoggedInUser怎么用?PHP UsersHelper::getLoggedInUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UsersHelper
的用法示例。
在下文中一共展示了UsersHelper::getLoggedInUser方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ucwords
}
?>
</ul>
</li>
<li><span><?php
echo TextHelper::_('COBALT_ASSIGNED_TO');
?>
</span></li>
<li class="dropdown">
<a class="dropdown-toggle update-toggle-text" href="#" data-toggle="dropdown" role="button" id="event_assignee_link" ><span class="dropdown-label"><?php
echo $user_filter;
?>
</span></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="event_assignee_link" data-filter="assigned">
<li><a class="dropdown_item filter_assign" data-filter-value="{'individual',<?php
echo UsersHelper::getLoggedInUser()->id;
?>
}" ><?php
echo TextHelper::_('COBALT_ME');
?>
</a></li>
<?php
if ($user_role != 'basic') {
?>
<?php
if ($user_role == "exec") {
?>
<li><a href="javascript:void(0);" data-filter-value="{'individual','all'}"><?php
echo ucwords(TextHelper::_('COBALT_ALL_USERS'));
?>
</a></li>
示例2: array
:</div>
<div class="crmeryValue">
<div class='dropdown' id="person_owner" data-item="deal" data-field="owner_id" data-item-id="<?php
echo $person['id'];
?>
">
<a href="#" class='dropdown-toggle update-toggle-html' role='button' data-toggle='dropdown' id='person_owner_link'><span id="owner_first_name_<?php
echo $person['id'];
?>
"><?php
echo $person['owner_first_name'] . " " . $person['owner_last_name'];
?>
</span></a>
<ul class="dropdown-menu pull-right" role="menu">
<?php
$me = array(array('label' => TextHelper::_('COBALT_ME'), 'value' => UsersHelper::getLoggedInUser()->id));
$users = UsersHelper::getUsers(null, TRUE);
$users = array_merge($me, $users);
if (count($users)) {
foreach ($users as $key => $user) {
?>
<li>
<a href="javascript:void(0);" class="dropdown_item" data-field="owner_id" data-item="person" data-item-id="<?php
echo $person['id'];
?>
" data-value="<?php
echo $user['value'];
?>
">
<?php
echo $user['label'];
示例3:
if ($event['type'] == 'task') {
$due_date = $event['due_date'] != '0000-00-00 00:00:00' ? DateHelper::formatDate($event['due_date']) : TextHelper::_('COBALT_NA');
$time = $event['due_date_hour'];
} else {
$due_date = DateHelper::formatDate($event['start_time']);
$time = $event['start_time_hour'];
}
$id = (array_key_exists('parent_id', $event) && $event['parent_id']) != 0 ? $event['parent_id'] : $event['id'];
echo '<tr id="list_row_' . $id . '" class="cobalt_row_' . $k . '">';
if ($event['completed'] == 1) {
$completed = "line-through";
} else {
$completed = "";
}
echo '<td>';
if (UsersHelper::getLoggedInUser()->id == $event['owner_id'] || UsersHelper::getLoggedInUser()->id == $event['assignee_id'] || UsersHelper::isAdmin() || UsersHelper::getRole() == "exec") {
echo '<input type="checkbox" name="ids[]" value="' . $id . '" />';
}
echo '</td>';
echo '<td><div class="dropdown"><a data-toggle="dropdown" role="button" class="dropdown-toggle ' . $completed . '" id="event_menu_' . $event['id'] . '_link" >';
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'];