Documentation

pm_Hook_Permissions
in package
implements pm_Hook_Interface

Hook for registering permissions

Tags
since
17.0

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
since
18.0.22

SECTION_ADMIN_APPEARANCE

public mixed SECTION_ADMIN_APPEARANCE = 'admin-appearance'
Tags
since
18.0.22

SECTION_ADMIN_APPS

public mixed SECTION_ADMIN_APPS = 'admin-apps'
Tags
since
18.0.22

SECTION_ADMIN_GENERAL

public mixed SECTION_ADMIN_GENERAL = 'admin-general'
Tags
since
18.0.22

SECTION_ADMIN_MAIL

public mixed SECTION_ADMIN_MAIL = 'admin-mail'
Tags
since
18.0.22

SECTION_ADMIN_MODULES

public mixed SECTION_ADMIN_MODULES = 'admin-modules'
Tags
since
18.0.22

SECTION_ADMIN_PANEL

public mixed SECTION_ADMIN_PANEL = 'admin-panel'
Tags
since
18.0.22

SECTION_ADMIN_SERVER

public mixed SECTION_ADMIN_SERVER = 'admin-server'
Tags
since
18.0.22

SECTION_ADMIN_SERVICES

public mixed SECTION_ADMIN_SERVICES = 'admin-services'
Tags
since
18.0.22

SECTION_ADMIN_STATISTICS

public mixed SECTION_ADMIN_STATISTICS = 'admin-statistics'
Tags
since
18.0.22

SECTION_ADMIN_TOOLS

public mixed SECTION_ADMIN_TOOLS = 'admin-tools'
Tags
since
18.0.22

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',
    ],
    ...
]
Return values
array<string|int, mixed>

Search results