MediaWiki master
MediaWiki\Content\Hook\ContentHandlerForModelIDHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onContentHandlerForModelID ( $modelName, &$handler)
 This hook is called when a ContentHandler is requested for a given content model name, but no entry for that model exists in $wgContentHandlers.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 14 of file ContentHandlerForModelIDHook.php.

Member Function Documentation

◆ onContentHandlerForModelID()

MediaWiki\Content\Hook\ContentHandlerForModelIDHook::onContentHandlerForModelID ( $modelName,
& $handler )

This hook is called when a ContentHandler is requested for a given content model name, but no entry for that model exists in $wgContentHandlers.

Note: if your extension implements additional models via this hook, please use GetContentModels hook to make them known to core.

Since
1.35
Parameters
string$modelNameRequested content model name
ContentHandler&$handlerSet this to a ContentHandler object, if desired
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


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