Craft 3 Class Reference

Class craft\web\twig\variables\UserGroups

Inheritance
craft\web\twig\variables\UserGroups
Available since version
3.0
Deprecated since version
in 3.0
Source Code
https://github.com/craftcms/cms/blob/master/src/web/twig/variables/UserGroups.php

User group functions.

Public Methods
Method Description Defined By
getAllGroups() Returns all user groups. craft\web\twig\variables\UserGroups
getGroupByHandle() Gets a user group by its handle. craft\web\twig\variables\UserGroups
getGroupById() Gets a user group by its ID. craft\web\twig\variables\UserGroups

Method Details

getAllGroups() public method #

Returns all user groups.

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

getGroupByHandle() public method #

Gets a user group by its handle.

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

getGroupById() public method #

Gets a user group by its ID.

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