class Permission_Group (View source)

Permission_Group class

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

Properties

protected string $name

Name of the permission group (can be used as label in an interface)

protected string $permissions

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

Methods

public
__construct(string $name, array $permissions)

Constructor

public
string
getName()

Get the name of the permission group

public
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 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 Permission::check(). The value is suitable for using in an interface.