Back to Joomla project (class list)

Class UserGroupsHelper - list of methods

Helper to deal with user groups.
Package: Joomla\CMS\Helper
Copyright: (C) 2016 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Helper/UserGroupsHelper.php
Project: Joomla

Method Summary

public
(array $groups = array(), mixed $mode = self::MODE_INSTANCE)

Constructor
Parameters
  • array $groups Array of groups
  • int $mode Working mode for this class
Since
  • 3.6.3
Show source code of this method: __construct Source Code

public int
()

Count loaded user groups.
Returns
  • int
Since
  • 3.6.3
Show source code of this method: count Source Code

public static self
()

Get the helper instance.
Returns
  • self
Since
  • 3.6.3
Show source code of this method: getInstance Source Code

public mixed
(mixed $id)

Get a user group by its id.
Parameters
  • int $id Group identifier
Returns
  • mixed stdClass on success. False otherwise
Since
  • 3.6.3
Show source code of this method: get Source Code

public array
()

Get the list of existing user groups.
Returns
  • array
Since
  • 3.6.3
Show source code of this method: getAll Source Code

public bool
(mixed $id)

Check if a group is in the list.
Parameters
  • int $id Group identifier
Returns
  • bool
Since
  • 3.6.3
Show source code of this method: has Source Code

private bool
()

Check if this instance is a singleton.
Returns
  • bool
Since
  • 3.6.3
Show source code of this method: isSingleton Source Code

public int
()

Get total available user groups in database.
Returns
  • int
Since
  • 3.6.3
Show source code of this method: total Source Code

public mixed
(mixed $id)

Load a group from database.
Parameters
  • int $id Group identifier
Returns
  • mixed
Since
  • 3.6.3
Show source code of this method: load Source Code

public self
()

Load all user groups from the database.
Returns
  • self
Since
  • 3.6.3
Show source code of this method: loadAll Source Code

private array
()

Populates extra information for groups.
Returns
  • array
Since
  • 3.6.3
Show source code of this method: populateGroupsData Source Code

public \stdClass
(mixed $group)

Populate data for a specific user group.
Parameters
  • \stdClass $group Group
Returns
  • \stdClass
Since
  • 3.6.3
Show source code of this method: populateGroupData Source Code

public self
(array $groups)

Set the groups to be used as source.
Parameters
  • array $groups Array of user groups.
Returns
  • self
Since
  • 3.6.3
Show source code of this method: setGroups Source Code

Properties Summary

private static array
$instance
Singleton instance.
Since
  • 3.6.3
private array
$groups
Available user groups
Since
  • 3.6.3
private int
$mode
Mode this class is working: singleton or std instance
Since
  • 3.6.3
private int
$total
Total available groups
Since
  • 3.6.3

Constants Summary

public int
$MODE_SINGLETON
Indicates the current helper instance is the singleton instance.
Since
  • 3.6.3
public int
$MODE_INSTANCE
Indicates the current helper instance is a standalone class instance.
Since
  • 3.6.3

Tags Summary

Since
3.6.3