class Permission_Group (View source)

Permission_Group class

This class is used to group permissions together for showing on an interface.

Methods

__construct(string $name, array $permissions)

Constructor

string
getName()

Get the name of the permission group

array
getPermissions()

Get permissions

Details

__construct(string $name, array $permissions)

Constructor

Parameters

string $name

Text that could be used as label used in an interface

array $permissions

Associative array of permissions in this permission group. The array indicies are the permission codes as used in {@link Permission::check()}. The value is suitable for using in an interface.

string getName()

Get the name of the permission group

Return Value

string

Name (label) of the permission group

array getPermissions()

Get permissions

Return Value

array

Associative array of permissions in this permission group. The array indicies are the permission codes as used in {@link Permission::check()}. The value is suitable for using in an interface.