本文整理汇总了PHP中UsersHelper::getUserId方法的典型用法代码示例。如果您正苦于以下问题:PHP UsersHelper::getUserId方法的具体用法?PHP UsersHelper::getUserId怎么用?PHP UsersHelper::getUserId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UsersHelper
的用法示例。
在下文中一共展示了UsersHelper::getUserId方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
?>
<?php
$all = array();
$all[] = JHTML::_('select.option', 'all', TextHelper::_('COBALT_ALL'));
echo JHtml::_('select.options', $all, 'value', 'text', $user_filter, true);
?>
<?php
}
?>
<optgroup label="<?php
echo TextHelper::_('COBALT_MEMBERS');
?>
" class="member" id="member" >
<?php
$member = array();
$member[] = JHTML::_('select.option', UsersHelper::getUserId(), TextHelper::_('COBALT_ME'));
echo JHtml::_('select.options', $member, 'value', 'text', $user_filter, true);
?>
<?php
echo JHtml::_('select.options', $this->user_names, 'value', 'text', $user_filter, true);
?>
</optgroup>
<?php
if (UsersHelper::getRole() == 'exec') {
?>
<optgroup label="<?php
echo TextHelper::_('COBALT_TEAM');
?>
" class="team" id="team" >
<?php
echo JHtml::_('select.options', $this->team_names, 'value', 'text', $user_filter, true);
示例2: array
echo $association_type;
?>
" />
</div>
</div>
</div>
<div class="cobaltRow">
<div class="cobaltField"><?php
echo TextHelper::_('COBALT_EDIT_TASK_ASSIGN_TO');
?>
</div>
<div class="cobaltValue">
<select class="form-control" name="assignee_id">
<?php
$users = array();
$users[UsersHelper::getUserId()] = TextHelper::_('COBALT_ME');
$users += DropdownHelper::getUserNames();
echo JHtml::_('select.options', $users, 'value', 'text', $event['assignee_id'], true);
?>
</select>
</div>
</div>
</div>
<div class="tab-pane fade" id="Date">
<div class="cobaltRow">
<div class="cobaltField"><?php
echo TextHelper::_('COBALT_EDIT_TASK_DUE_DATE');
?>
</div>
<div class="cobaltValue">
<div id="due_date_container">
示例3: Copyright
<?php
/*------------------------------------------------------------------------
# Cobalt
# ------------------------------------------------------------------------
# @author Cobalt
# @copyright Copyright (C) 2012 cobaltcrm.org All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Website: http://www.cobaltcrm.org
-------------------------------------------------------------------------*/
// no direct access
defined('_CEXEC') or die('Restricted access');
$convo = $this->conversation;
echo '<div class="media" id="convo_entry_' . $convo['id'] . '">';
if (UsersHelper::getRole() == "exec" || $convo['author'] == UsersHelper::getUserId()) {
echo '<div class="btn-group pull-right"><a class="btn" href="javascript:void(0);" onclick="editConvoEntry(' . $convo['id'] . ')"><i class="glyphicon glyphicon-pencil"></i></a><a class="btn" href="javascript:void(0);" onclick="trashConvoEntry(' . $convo['id'] . ')"><i class="glyphicon glyphicon-trash"></i></a></div>';
}
echo '<div class="pull-left"><img class="media-object widget" src="' . $convo['owner_avatar'] . '" /></div>';
echo '<div class="media-body">';
echo '<h4 class="media-heading">' . $convo['owner_first_name'] . ' ' . $convo['owner_last_name'] . '</h4>';
echo nl2br($convo['conversation']);
echo '</div>';
echo '<hr /></div>';
示例4:
echo TextHelper::_('COBALT_ASSOCIATE_TO_DEAL');
?>
</a>
</li>
<?php
if ($person['owner_id'] == UsersHelper::getUserId()) {
?>
<li><a onclick="shareItemDialog();"><?php
echo TextHelper::_('COBALT_SHARE');
?>
</a></li>
<?php
}
?>
<?php
if (UsersHelper::canDelete() || $person['owner_id'] == UsersHelper::getUserId()) {
?>
<li>
<a onclick="deleteItem(this)"><?php
echo TextHelper::_('COBALT_DELETE_CONTACT');
?>
</a>
<form id="delete_form" method="POST" action="<?php
echo RouteHelper::_('index.php?task=main.trash');
?>
">
<input type="hidden" name="item_id" value="<?php
echo $person['id'];
?>
"/>
<input type="hidden" name="item_type" value="people"/>
示例5:
if ($app->input->get('view') != "print") {
?>
<div class='alert alert-info'>
<?php
echo TextHelper::_('COBALT_SHOW_TASKS_FOR');
?>
:
<span class="dropdown">
<a class="dropdown-toggle" href="#" data-toggle="dropdown" role="button" href="javascript:void(0);" id="event_user_link" ><?php
echo TextHelper::_('COBALT_ME');
?>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="event_user_link">
<?php
$user_role = UsersHelper::getRole();
$user_id = UsersHelper::getUserId();
?>
<li><a class="filter_user_<?php
echo $user_id;
?>
" onclick="Task.updateEventList(<?php
echo $user_id;
?>
,0)" ><?php
echo TextHelper::_('COBALT_ME');
?>
</a></li>
<?php
if ($user_role != 'basic') {
?>
<li><a href="javascript:void(0);" class="filter_user_all" onclick="Task.updateEventList('all',0)" >all users</a></li>
示例6:
?>
</a>
</li>
<?php
if ($deal->owner_id == UsersHelper::getUserId()) {
?>
<li><a href="javascript:void(0);" onclick="Cobalt.shareItemDialog();" ><?php
echo TextHelper::_('COBALT_SHARE');
?>
</a></li>
<?php
}
?>
<li>
<?php
if (UsersHelper::canDelete() || $deal->owner_id == UsersHelper::getUserId()) {
?>
<a href="<?php
echo RouteHelper::_('index.php?task=trash&item_id=' . $deal->id . '&item_type=deals&page_redirect=deals');
?>
" onclick="deleteProfileItem(this)"><?php
echo TextHelper::_('COBALT_DELETE');
?>
</a>
<?php
}
?>
</li>
<li>
<a href="<?php
echo RouteHelper::_('index.php?view=printFriendly&item_id=' . $deal->id . '&layout=deal&model=deal');
示例7: isset
?>
"
name="address_country"
value="<?php
echo isset($this->company->address_country) ? $this->company->address_country : "";
?>
"/>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade in" id="Assignment">
<?php
if (UsersHelper::getRole() == 'exec' || UsersHelper::getRole() == "manager" || !($this->company->id > 0) || array_key_exists('owner_id', $this->company) && UsersHelper::getUserId() == $this->company->owner_id || UsersHelper::isAdmin()) {
?>
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label class="control-label" for="">
<?php
echo ucwords(TextHelper::_('COBALT_COMPANY_OWNER'));
?>
</label>
<div class="controls">
<?php
echo DropdownHelper::generateDropdown('owner', $ownerId, 'company');
?>
</div>
</div>
示例8: str_replace
$team_filter = $this->state->get('Deal.' . str_replace('_filter', '', $app->input->get('layout')) . '_owner_id');
?>
<optgroup label="<?php
echo TextHelper::_('COBALT_TEAM');
?>
" class="team">
<?php
echo JHtml::_('select.options', $this->team_names, 'value', 'text', $user_filter, true);
?>
</optgroup>
<optgroup label="<?php
echo TextHelper::_('COBALT_MEMBERS');
?>
" class="member">
<option value="<?php
echo UsersHelper::getUserId();
?>
"><?php
echo TextHelper::_('COBALT_ME');
?>
</option>
<?php
echo JHtml::_('select.options', $this->user_names, 'value', 'text', $team_filter, true);
?>
</optgroup>
<?php
}
?>
</select>
</td>
</tr>
示例9: getActivity
public static function getActivity()
{
$db = \Cobalt\Container::fetch('db');
$query = $db->getQuery(true);
$query->select('h.*, CONCAT(u.first_name," ", u.last_name) AS owner_name, c.name as company_name, CONCAT(p.first_name," ", p.last_name) AS person_name,
d.name as deal_name, e.name as event_name, note_cat.name as notes_category_name,
event_cat.name as events_category_name, old_event_cat.name as events_category_name_old, old_note_cat.name AS notes_category_name_old,
doc.name AS document_name,status.name AS deal_status_name_old, status2.name AS deal_status_name,deal_source.name AS deal_source_name_old,deal_source_2.name AS deal_source_name,
deal_stage.name AS deal_stage_name_old,deal_stage_2.name AS deal_stage_name,CONCAT(deal_owner.first_name," ",deal_owner.last_name) AS deal_owner_name_old,
CONCAT(deal_owner_2.first_name," ",deal_owner_2.last_name) AS deal_owner_name
');
$query->from('#__history AS h');
$query->leftJoin('#__users AS u ON u.id = h.user_id');
$query->leftJoin('#__companies AS c ON c.id = h.type_id AND h.type="company"');
$query->leftJoin('#__notes AS n ON n.id = h.type_id AND h.type="note"');
$query->leftJoin('#__deals AS d on d.id = h.type_id AND h.type="deal"');
$query->leftJoin('#__people AS p on p.id = h.type_id AND h.type="person"');
$query->leftJoin('#__goals AS g on g.id = h.type_id AND h.type="goal"');
$query->leftJoin('#__events AS e on e.id = h.type_id AND h.type="event"');
$query->leftJoin('#__reports AS r on r.id = h.type_id AND h.type="report"');
$query->leftJoin('#__documents AS doc ON doc.id = h.type_id AND h.type="document"');
$query->leftJoin('#__notes_categories as note_cat ON note_cat.id = h.new_value AND h.field="category_id" AND h.type="notes"');
$query->leftJoin('#__events_categories as event_cat ON event_cat.id = h.new_value AND h.field="category_id" AND h.type="events"');
$query->leftJoin('#__notes_categories as old_note_cat ON old_note_cat.id = h.old_value AND h.field="category_id" AND h.type="notes"');
$query->leftJoin('#__events_categories as old_event_cat ON old_event_cat.id = h.old_value AND h.field="category_id" AND h.type="events"');
$query->leftJoin("#__deal_status AS status ON status.id = h.old_value AND h.type='deal'");
$query->leftJoin("#__deal_status AS status2 ON status2.id = h.new_value AND h.type='deal'");
$query->leftJoin("#__sources AS deal_source ON deal_source.id = h.old_value AND h.type='deal'");
$query->leftJoin("#__sources AS deal_source_2 ON deal_source_2.id = h.new_value AND h.type='deal'");
$query->leftJoin("#__stages AS deal_stage ON deal_stage.id = h.old_value AND h.type='deal'");
$query->leftJoin("#__stages AS deal_stage_2 ON deal_stage_2.id = h.new_value AND h.type='deal'");
$query->leftJoin("#__users AS deal_owner ON deal_owner.id = h.old_value AND h.type='deal'");
$query->leftJoin("#__users AS deal_owner_2 ON deal_owner_2.id = h.new_value AND h.type='deal'");
$member_id = UsersHelper::getUserId();
$member_role = UsersHelper::getRole();
$team_id = UsersHelper::getTeamId();
if ($member_role != 'exec') {
//manager filter
if ($member_role == 'manager') {
$query->where('u.team_id = ' . $team_id);
} else {
//basic user filter
$query->where(array('h.user_id = ' . $member_id));
}
}
//TODO: Add assignees to the display (massive left join)
$query->where('h.field!="assignee_id" AND h.field!="repeats"');
$query->order('h.date DESC');
if (self::$limit != null) {
$query .= " LIMIT " . self::$limit;
} else {
$query .= " LIMIT 10";
}
$db->setQuery($query);
$activity = $db->loadObjectList();
return $activity;
}