model/modx/modusergroup.class.php
- package
- modx
- Classes
- modUserGroup
Description
Represents a group of users with common attributes.
\modUserGroup
- Extends from
- \xPDOSimpleObject
- package
- modx
- Methods
- getResourceGroups
- getUsersIn
- remove
- save
Description
Represents a group of users with common attributes.
This is the basis for the entire xPDO object model, and can also be used by a class generator {@link xPDOGenerator}, ultimately allowing custom classes to be user-defined in a web interface and framework-generated at runtime.
Methods
getResourceGroups
getResourceGroups(
\$limit $limit
=
false, \$start $start
=
0
)
:
array
Get all resource groups related to the user group.
Arguments
- $limit
- \$limit
The number of Resource Groups to grab. Defaults to 0, which grabs all Groups. - $start
- \$start
The starting index for the limit query.
Output
- array
- An array of resource groups.
Details
- visibility
- public
- final
- false
- static
- false
- access
- public
getUsersIn
getUsersIn(
$criteria
=
array
)
:
array
Get all users in a user group.
Arguments
- $criteria
Output
- array
- An array of {@link modUser} objects.
Details
- visibility
- public
- final
- false
- static
- false
- access
- public
remove
remove(
array $ancestors
=
array
)
:
boolean
Overrides xPDOObject::remove to fire modX-specific events
{@inheritDoc}
Arguments
- $ancestors
- array
Keeps track of classes which have already been removed to prevent loop with circular references.
Output
- boolean
- Returns true on success, false on failure.
Details
- visibility
- public
- final
- false
- static
- false
save
save(
boolean $cacheFlag
=
null
)
:
boolean
Overrides xPDOObject::save to fire modX-specific events.
{@inheritDoc}
Arguments
- $cacheFlag
- boolean
Output
- boolean
- True if the save was successful
Details
- visibility
- public
- final
- false
- static
- false