UserGroupsHelper
Helper to deal with user groups.
since |
3.6.3 |
---|---|
package |
Joomla CMS |
Methods
__construct
Constructor
__construct(array groups = array(), int mode = self::MODE_INSTANCE) : mixed
since |
3.6.3 |
---|
Arguments
- groups
array
Array of groups- mode
int
Working mode for this class
Response
mixed
count
Count loaded user groups.
count() : int
since |
3.6.3 |
---|
Response
int
get
Get a user group by its id.
get(int id) : mixed
since |
3.6.3 |
---|
Arguments
- id
int
Group identifier
Response
mixed
stdClass on success. False otherwise
getAll
Get the list of existing user groups.
getAll() : array
since |
3.6.3 |
---|
Response
array
getInstance
Get the helper instance.
getInstance() : self
since |
3.6.3 |
---|
Response
self
has
Check if a group is in the list.
has(int id) : bool
since |
3.6.3 |
---|
Arguments
- id
int
Group identifier
Response
bool
isSingleton
Check if this instance is a singleton.
isSingleton() : bool
since |
3.6.3 |
---|
Response
bool
load
Load a group from database.
load(int id) : mixed
since |
3.6.3 |
---|
Arguments
- id
int
Group identifier
Response
mixed
loadAll
Load all user groups from the database.
loadAll() : self
since |
3.6.3 |
---|
Response
self
populateGroupData
Populate data for a specific user group.
populateGroupData(\stdClass group) : \stdClass
since |
3.6.3 |
---|
Arguments
- group
\stdClass
Group
Response
\stdClass
populateGroupsData
Populates extra information for groups.
populateGroupsData() : array
since |
3.6.3 |
---|
Response
array
setGroups
Set the groups to be used as source.
setGroups(array groups) : self
since |
3.6.3 |
---|
Arguments
- groups
array
Array of user groups.
Response
self
total
Get total available user groups in database.
total() : int
since |
3.6.3 |
---|
Response
int
Constants
MODE_SINGLETON
Indicates the current helper instance is the singleton instance.
Value | 1 |
---|---|
since |
3.6.3 |
Type(s)
int
MODE_INSTANCE
Indicates the current helper instance is a standalone class instance.
Value | 2 |
---|---|
since |
3.6.3 |
Type(s)
int