Documentation

rex_perm
in package

Class for permissions.

Tags
author

gharlan

Table of Contents

EXTRAS  = 'extras'
GENERAL  = 'general'
OPTIONS  = 'options'
getAll()  : array<string|int, mixed>
Returns all permissions for the given group.
has()  : bool
Returns whether the permission is registered.
register()  : mixed
Registers a new permission.

Constants

EXTRAS

public mixed EXTRAS = 'extras'

GENERAL

public mixed GENERAL = 'general'

OPTIONS

public mixed OPTIONS = 'options'

Methods

getAll()

Returns all permissions for the given group.

public static getAll([string $group = self::GENERAL ]) : array<string|int, mixed>
Parameters
$group : string = self::GENERAL

Perm group

Return values
array<string|int, mixed>

Permissions

has()

Returns whether the permission is registered.

public static has(string $perm) : bool
Parameters
$perm : string
Return values
bool

register()

Registers a new permission.

public static register(string $perm[, string $name = null ][, string $group = self::GENERAL ]) : mixed
Parameters
$perm : string

Perm key

$name : string = null

Perm name

$group : string = self::GENERAL

Perm group, possible values are rex_perm::GENERAL, rex_perm::OPTIONS and rex_perm::EXTRAS

Return values
mixed

        

Search results