pm_Hook_Permissions
in package
implements
pm_Hook_Interface
Hook for registering permissions
Tags
Interfaces, Classes and Traits
- pm_Hook_Interface
- Generic interface for hooks
Table of Contents
- PLACE_ADDITIONAL = 'additional'
- PLACE_ADMIN = 'admin'
- PLACE_MAIN = 'main'
- SECTION_ADMIN_APPEARANCE = 'admin-appearance'
- SECTION_ADMIN_APPS = 'admin-apps'
- SECTION_ADMIN_GENERAL = 'admin-general'
- SECTION_ADMIN_MAIL = 'admin-mail'
- SECTION_ADMIN_MODULES = 'admin-modules'
- SECTION_ADMIN_PANEL = 'admin-panel'
- SECTION_ADMIN_SERVER = 'admin-server'
- SECTION_ADMIN_SERVICES = 'admin-services'
- SECTION_ADMIN_STATISTICS = 'admin-statistics'
- SECTION_ADMIN_TOOLS = 'admin-tools'
- getPermissions() : array<string|int, mixed>
- Retrieve the list of permissions
Constants
PLACE_ADDITIONAL
public
mixed
PLACE_ADDITIONAL
= 'additional'
PLACE_ADMIN
public
mixed
PLACE_ADMIN
= 'admin'
Tags
PLACE_MAIN
public
mixed
PLACE_MAIN
= 'main'
SECTION_ADMIN_APPEARANCE
public
mixed
SECTION_ADMIN_APPEARANCE
= 'admin-appearance'
Tags
SECTION_ADMIN_APPS
public
mixed
SECTION_ADMIN_APPS
= 'admin-apps'
Tags
SECTION_ADMIN_GENERAL
public
mixed
SECTION_ADMIN_GENERAL
= 'admin-general'
Tags
SECTION_ADMIN_MAIL
public
mixed
SECTION_ADMIN_MAIL
= 'admin-mail'
Tags
SECTION_ADMIN_MODULES
public
mixed
SECTION_ADMIN_MODULES
= 'admin-modules'
Tags
SECTION_ADMIN_PANEL
public
mixed
SECTION_ADMIN_PANEL
= 'admin-panel'
Tags
SECTION_ADMIN_SERVER
public
mixed
SECTION_ADMIN_SERVER
= 'admin-server'
Tags
SECTION_ADMIN_SERVICES
public
mixed
SECTION_ADMIN_SERVICES
= 'admin-services'
Tags
SECTION_ADMIN_STATISTICS
public
mixed
SECTION_ADMIN_STATISTICS
= 'admin-statistics'
Tags
SECTION_ADMIN_TOOLS
public
mixed
SECTION_ADMIN_TOOLS
= 'admin-tools'
Tags
Methods
getPermissions()
Retrieve the list of permissions
public
abstract getPermissions() : array<string|int, mixed>
[
'unique_permission_id' => [
'default' => false,
'place' => self::PLACE_MAIN,
'name' => 'Permission name',
'description' => 'Permission description',
'master' => 'master_permission_id',
],
'another_unique_permission_id' => [
'default' => true,
'place' => self::PLACE_ADMIN,
// 'section' is only active when self::PLACE_ADMIN is used, if omitted, defaults to self::SECTION_ADMIN_MODULES
'section' => self::SECTION_ADMIN_APPS,
'name' => 'Permission name',
'description' => 'Permission description',
'master' => 'another_master_permission_id',
],
...
]