class TwillPermissions (View source)

Properties

string $roleEnum

Methods

bool
enabled()

No description

string
roles()

No description

void
setRoleEnum(string $roleEnum)

The role enumeration class. Must extend MyCLabs\Enum\Enum.

bool|string
getPermissionModule(string $moduleName)

Return the module name if the module has permissions, otherwise return false.

bool
levelIs(string $level)

No description

bool
levelIsOneOf(array $levels)

No description

void
showUserSecondaryNavigation()

No description

Details

bool enabled()

No description

Return Value

bool

string roles()

No description

Return Value

string

void setRoleEnum(string $roleEnum)

The role enumeration class. Must extend MyCLabs\Enum\Enum.

See A17\Twill\Models\Enums\UserRole for an example.

Parameters

string $roleEnum

Return Value

void

bool|string getPermissionModule(string $moduleName)

Return the module name if the module has permissions, otherwise return false.

Parameters

string $moduleName

Return Value

bool|string

bool levelIs(string $level)

No description

Parameters

string $level

Return Value

bool

bool levelIsOneOf(array $levels)

No description

Parameters

array $levels

Return Value

bool

void showUserSecondaryNavigation()

No description

Return Value

void