MediaWiki master
MediaWiki\Api\Hook\ApiQueryTokensRegisterTypesHook Interface Reference

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

Inherited by MediaWiki\Api\ApiHookRunner.

Public Member Functions

 onApiQueryTokensRegisterTypes (&$salts)
 Use this hook to add additional token types to action=query&meta=tokens.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 12 of file ApiQueryTokensRegisterTypesHook.php.

Member Function Documentation

◆ onApiQueryTokensRegisterTypes()

MediaWiki\Api\Hook\ApiQueryTokensRegisterTypesHook::onApiQueryTokensRegisterTypes ( & $salts)

Use this hook to add additional token types to action=query&meta=tokens.

Note that most modules will probably be able to use the CSRF token instead of creating their own token types.

Since
1.35
Parameters
array&$salts[ type => salt to pass to User::getEditToken(), or array of salt and key to pass to Session::getToken() ]
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\Api\ApiHookRunner.


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