UserGroups

Type
Class
Namespace
craft\web\twig\variables
Inherits
craft\web\twig\variables\UserGroups
Since
3.0
Deprecated in
in 3.0

User group functions.

View source

Public Methods

MethodDescription
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

Arguments

Returns

craft\models\UserGroup[]

Signature

public craft\models\UserGroup[] getAllGroups ( \craft\web\twig\variables\string $indexBy = null )

getGroupByHandle()

Gets a user group by its handle.

View source

Arguments

Returns

craft\models\UserGroup, null

Signature

public craft\models\UserGroup, null getGroupByHandle ( \craft\web\twig\variables\string $groupHandle )

getGroupById()

Gets a user group by its ID.

View source

Arguments

Returns

craft\models\UserGroup, null

Signature

public craft\models\UserGroup, null getGroupById ( \craft\web\twig\variables\int $groupId )