class RolesBag (View source)

deprecated Use rolesBag service

Roles bag used to get quickly a role entity and to create it automatically if it does not exist.

Properties

static protected Role[string] $roles Cached roles values.

Methods

static Role
get(string $roleName) deprecated

Get role by name or create it if non-existant.

Details

static Role get(string $roleName) deprecated

deprecated Use rolesBag service

Get role by name or create it if non-existant.

Parameters

string $roleName

Return Value

Role