MediaWiki master
MediaWiki\Block\BlockActionInfo Class Reference

Defines the actions that can be blocked by a partial block. More...

Public Member Functions

 __construct (HookContainer $hookContainer)
 
 getActionFromId (int $actionId)
 
 getAllBlockActions ()
 
 getIdFromAction (string $action)
 

Public Attributes

const ACTION_CREATE = 3
 
const ACTION_MOVE = 2
 
const ACTION_UPLOAD = 1
 

Detailed Description

Defines the actions that can be blocked by a partial block.

They are always blocked by a sitewide block.

NB: The terms "right" and "action" are often used to describe the same string, depending on the context. E.g. a querystring might contain 'action=edit', but the PermissionManager will refer to the 'edit' right.

Here, we use "action", since a user may be in a group that has a certain right, while also being blocked from performing that action.

Since
1.37

Definition at line 40 of file BlockActionInfo.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Block\BlockActionInfo::__construct ( HookContainer $hookContainer)
Parameters
HookContainer$hookContainer

Definition at line 77 of file BlockActionInfo.php.

Member Function Documentation

◆ getActionFromId()

MediaWiki\Block\BlockActionInfo::getActionFromId ( int $actionId)
Parameters
int$actionId
Returns
string|false

Definition at line 106 of file BlockActionInfo.php.

◆ getAllBlockActions()

MediaWiki\Block\BlockActionInfo::getAllBlockActions ( )
Returns
int[]

Definition at line 90 of file BlockActionInfo.php.

◆ getIdFromAction()

MediaWiki\Block\BlockActionInfo::getIdFromAction ( string $action)
Parameters
string$action
Returns
int|bool False if the action is not in the list of blockable actions

Definition at line 114 of file BlockActionInfo.php.

Member Data Documentation

◆ ACTION_CREATE

const MediaWiki\Block\BlockActionInfo::ACTION_CREATE = 3
Access: internal
Public for testing only – use getIdFromAction()

Definition at line 51 of file BlockActionInfo.php.

◆ ACTION_MOVE

const MediaWiki\Block\BlockActionInfo::ACTION_MOVE = 2
Access: internal
Public for testing only – use getIdFromAction()

Definition at line 48 of file BlockActionInfo.php.

◆ ACTION_UPLOAD

const MediaWiki\Block\BlockActionInfo::ACTION_UPLOAD = 1
Access: internal
Public for testing only – use getIdFromAction()

Definition at line 45 of file BlockActionInfo.php.


The documentation for this class was generated from the following file: