< Manual:Hooks 
 
      |  | This feature was removed completely in version 1.36.0 (after being deprecated in 1.24.0). This hook was removed in Gerrit change 625758. | 
| ApiTokensGetTokenTypes | |
|---|---|
| Available from version 1.20.0 Removed in version 1.36.0 Use this hook to extend action=tokens with new token types. | |
| Define function: | public static function onApiTokensGetTokenTypes( &$tokenTypes ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"ApiTokensGetTokenTypes": "MyExtensionHooks::onApiTokensGetTokenTypes"
	}
}
 | 
| Called from: | File(s): api/ApiTokens.php | 
| Interface: | ApiTokensGetTokenTypesHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ApiTokensGetTokenTypes extensions.
Details
- &$tokenTypes: supported token types in format 'type' => callback function used to retrieve this type of tokens.
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.