UserGroupsHelper
Helper to deal with user groups.
| since |
3.6.3 |
|---|---|
| package |
Joomla CMS |
Methods
__construct
Constructor
__construct(mixed||string|int groups = [], mode = self::MODE_INSTANCE) :
| since |
3.6.3 |
|---|
Arguments
- groups
array<string|int, mixed>Array of groups- mode
intWorking mode for this class
Response
mixed
count
Count loaded user groups.
count() :
| since |
3.6.3 |
|---|
Response
int
get
Get a user group by its id.
get( id) :
| since |
3.6.3 |
|---|
Arguments
- id
intGroup identifier
Response
mixedstdClass on success. False otherwise
getAll
Get the list of existing user groups.
getAll() : mixed||string|int
| since |
3.6.3 |
|---|
Response
array<string|int, mixed>
getInstance
Get the helper instance.
getInstance() :
| since |
3.6.3 |
|---|
Response
self
has
Check if a group is in the list.
has( id) :
| since |
3.6.3 |
|---|
Arguments
- id
intGroup identifier
Response
bool
isSingleton
Check if this instance is a singleton.
isSingleton() :
| since |
3.6.3 |
|---|
Response
bool
load
Load a group from database.
load( id) :
| since |
3.6.3 |
|---|
Arguments
- id
intGroup identifier
Response
mixed
loadAll
Load all user groups from the database.
loadAll() :
| since |
3.6.3 |
|---|
Response
self
populateGroupData
Populate data for a specific user group.
populateGroupData(\stdClass group) : \stdClass
| since |
3.6.3 |
|---|
Arguments
- group
stdClassGroup
Response
stdClass
populateGroupsData
Populates extra information for groups.
populateGroupsData() : mixed||string|int
| since |
3.6.3 |
|---|
Response
array<string|int, mixed>
setGroups
Set the groups to be used as source.
setGroups(mixed||string|int groups) :
| since |
3.6.3 |
|---|
Arguments
- groups
array<string|int, mixed>Array of user groups.
Response
self
total
Get total available user groups in database.
total() :
| 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
Properties
groups
Available user groups
| since |
3.6.3 |
|---|
Type(s)
array<string|int, mixed>
mode
Mode this class is working: singleton or std instance
| since |
3.6.3 |
|---|
Type(s)
int
total
Total available groups
| since |
3.6.3 |
|---|
Type(s)
int