45 private const ACTION_UPLOAD = 1;
48 private const ACTION_MOVE = 2;
51 private const ACTION_CREATE = 3;
68 private const CORE_BLOCK_ACTIONS = [
69 'upload' => self::ACTION_UPLOAD,
70 'move' => self::ACTION_MOVE,
71 'create' => self::ACTION_CREATE,
78 $this->hookRunner =
new HookRunner( $hookContainer );
85 private $allBlockActions =
null;
92 if ( !$this->allBlockActions ) {
93 $this->allBlockActions = self::CORE_BLOCK_ACTIONS;
94 $this->hookRunner->onGetAllBlockActions( $this->allBlockActions );
96 if ( count( $this->allBlockActions ) !== count( array_unique( $this->allBlockActions ) ) ) {
97 throw new MWException(
'Blockable action IDs not unique' );
99 return $this->allBlockActions;
107 return array_search( $actionId, $this->getAllBlockActions() );
115 return $this->getAllBlockActions()[$action] ??
false;
if(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.