phpBB API Documentation
Class

phpbb\permissions

class permissions

Methods

__construct(dispatcher_interface $phpbb_dispatcher, user $user)

Constructor

get_categories()

Returns an array with all the permission categories (pm, post, settings, misc, etc.)

get_category_lang($category)

Returns the language string of a permission category

get_types()

Returns an array with all the permission types (a_, u_, m_, etc.)

get_type_lang($type, $scope = false)

Returns the language string of a permission type

get_permissions()

Returns an array with all the permissions.

get_permission_category($permission)

Returns the category of a permission

category_defined($category)

Checks if a category has been defined

permission_defined($permission)

Checks if a permission has been defined

get_permission_lang($permission)

Returns the language string of a permission

Details

at line 36
public __construct(dispatcher_interface $phpbb_dispatcher, user $user)

Constructor

Parameters

dispatcher_interface $phpbb_dispatcher
user $user

at line 78
public get_categories()

Returns an array with all the permission categories (pm, post, settings, misc, etc.)

at line 89
public get_category_lang($category)

Returns the language string of a permission category

Parameters

$category

at line 99
public get_types()

Returns an array with all the permission types (a_, u_, m_, etc.)

at line 111
public get_type_lang($type, $scope = false)

Returns the language string of a permission type

Parameters

$type
$scope

at line 146
public get_permissions()

Returns an array with all the permissions.

Each Permission has the following layout: '' => array( 'lang' => 'Language Key with a Short description', // Optional, if not set, // the permissions identifier '' is used with // all uppercase. 'cat' => 'Identifier of the category, the permission should be displayed in', ), Example: 'uviewprofile' => array( 'lang' => 'ACLU_VIEWPROFILE', 'cat' => 'profile', ),

at line 157
public get_permission_category($permission)

Returns the category of a permission

Parameters

$permission

at line 168
public category_defined($category)

Checks if a category has been defined

Parameters

$category

at line 179
public permission_defined($permission)

Checks if a permission has been defined

Parameters

$permission

at line 190
public get_permission_lang($permission)

Returns the language string of a permission

Parameters

$permission