UserGroups
- Type
- Class
- Namespace
- craft\web\twig\variables
- Inherits
- craft\web\twig\variables\UserGroups
- Since
- 3.0.0
- Deprecated in
- in 3.0.0
User group functions.
View source (opens new window)
# Public Methods
Method | Description |
---|---|
getAllGroups() | Returns all user groups. |
getGroupByHandle() | Gets a user group by its handle. |
getGroupById() | Gets a user group by its ID. |
# getAllGroups()
Returns all user groups.
View source (opens new window)
Arguments
$indexBy
(string (opens new window), null (opens new window))
Returns
# getGroupByHandle()
Gets a user group by its handle.
View source (opens new window)
Arguments
$groupHandle
(string (opens new window))
Returns
craft\models\UserGroup, null (opens new window)
# getGroupById()
Gets a user group by its ID.
View source (opens new window)
Arguments
$groupId
(integer (opens new window))