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
arrayArray of groups- mode
intWorking 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
intGroup identifier
Response
mixedstdClass 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
intGroup 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
intGroup 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
\stdClassGroup
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
arrayArray 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
Properties
instance
Singleton instance.
| since |
3.6.3 |
|---|
Type(s)
array
groups
Available user groups
| since |
3.6.3 |
|---|
Type(s)
array
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