- md5
- 0199d3614cee0a9480b99db967018937
- sha1
- 904b75435ec712bc0b141820dd455d85dd702242
- sha256
- 9598cd7df31955b08c943d32897d10983c49298d2c65462af3b413395b5d6b53
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
<?php
/**
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access.
defined('_JEXEC') or die;
jimport('joomla.application.component.view');
/**
* View class for a list of user groups.
*
* @package Joomla.Administrator
* @subpackage com_users
* @since 1.6
*/
class UsersViewGroups extends JView
{
protected $items;
protected $pagination;
protected $state;
/**
* Display the view
*/
public function display($tpl = null)
{
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->addToolbar();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = UsersHelper::getActions();
JToolBarHelper::title(JText::_('COM_USERS_VIEW_GROUPS_TITLE'), 'groups');
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('group.add');
}
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('group.edit');
JToolBarHelper::divider();
}
if ($canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'groups.delete');
JToolBarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_users');
JToolBarHelper::divider();
}
JToolBarHelper::help('JHELP_USERS_GROUPS');
}
}
The same content is in 7 releases, Joomla 2.5.0 to 2.5.6. See them all, or every version of this file.