Source for file users.php
Documentation is available at users.php
* @package Joomla.Administrator
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Extended Utility class for the Users component.
* @package Joomla.Administrator
* @param string $src The source of the image
* @return string A <img> element if the specified file exists, otherwise, a null string
public static function image($src)
return '<img src="' .
JUri::root() .
$src .
'" alt="" />';
* Displays an icon to add a note for this user.
* @param integer $userId The user ID
* @return string A link to add a note
public static function addNote($userId)
$title =
JText::_('COM_USERS_ADD_NOTE');
return '<a href="' .
JRoute::_('index.php?option=com_users&task=note.add&u_id=' . (int)
$userId) .
'">'
.
'<span class="label label-info"><i class="icon-vcard"></i>' .
$title .
'</span></a>';
* Displays an icon to filter the notes list on this user.
* @param integer $count The number of notes for the user
* @param integer $userId The user ID
* @return string A link to apply a filter
$title =
JText::_('COM_USERS_FILTER_NOTES');
return '<a href="' .
JRoute::_('index.php?option=com_users&view=notes&filter_search=uid:' . (int)
$userId) .
'">'
.
JHtml::_('image', 'admin/filter_16.png', 'COM_USERS_NOTES', array('title' =>
$title), true) .
'</a>';
* @param integer $count The number of notes for the user
* @param integer $userId The user ID
* @return string A link to a modal window with the user notes
public static function notes($count, $userId)
$title =
JText::plural('COM_USERS_N_USER_NOTES', $count);
return '<a class="modal"'
.
' href="' .
JRoute::_('index.php?option=com_users&view=notes&tmpl=component&layout=modal&u_id=' . (int)
$userId) .
'"'
.
' rel="{handler: \'iframe\', size: {x: 800, y: 450}}">'
.
'<span class="label label-info"><i class="icon-drawer-2"></i>' .
$title .
'</span></a>';
* Build an array of block/unblock user states to be used by jgrid.state,
* State options will be different for any user
* and for currently logged in user
* @param boolean $self True if state array is for currently logged in user
* @return array a list of possible states to display
'active_title' =>
'COM_USERS_USER_FIELD_BLOCK_DESC',
'active_class' =>
'unpublish',
'inactive_class' =>
'unpublish'
'inactive_title' =>
'COM_USERS_USERS_ERROR_CANNOT_BLOCK_SELF',
'active_class' =>
'publish',
'inactive_class' =>
'publish'
'active_title' =>
'COM_USERS_TOOLBAR_UNBLOCK',
'active_class' =>
'unpublish',
'inactive_class' =>
'unpublish'
'active_title' =>
'COM_USERS_USER_FIELD_BLOCK_DESC',
'active_class' =>
'publish',
'inactive_class' =>
'publish'
* Build an array of activate states to be used by jgrid.state,
* @return array a list of possible states to display
'active_title' =>
'COM_USERS_TOOLBAR_ACTIVATE',
'active_class' =>
'unpublish',
'inactive_class' =>
'unpublish'
'inactive_title' =>
'COM_USERS_ACTIVATED',
'active_class' =>
'publish',
'inactive_class' =>
'publish'
Documentation generated on Tue, 19 Nov 2013 15:16:37 +0100 by phpDocumentor 1.4.3