MediaWiki master
MediaWiki\Api\Hook\ApiQueryCheckCanExecuteHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\Api\ApiHookRunner.

Public Member Functions

 onApiQueryCheckCanExecute ( $modules, $authority, &$message)
 This hook is called during at the beginning of ApiQuery::execute and can be used to prevent execution of query submodules.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "ApiQueryCheckCanExecute" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 17 of file ApiQueryCheckCanExecuteHook.php.

Member Function Documentation

◆ onApiQueryCheckCanExecute()

MediaWiki\Api\Hook\ApiQueryCheckCanExecuteHook::onApiQueryCheckCanExecute ( $modules,
$authority,
& $message )

This hook is called during at the beginning of ApiQuery::execute and can be used to prevent execution of query submodules.

Since
1.44
Parameters
ApiQueryBase[]$modules
Authority$authorityCurrent user
MessageSpecifier | string | array&$messageAPI message to die with.
Returns
bool|void True or no return value to continue, or false and set a message to cancel the request
See also
ApiMessage::create() for how the $message parameter is interpreted.
ApiCheckCanExecuteHook for non-query modules.

Implemented in MediaWiki\Api\ApiHookRunner.


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