3 namespace MediaWiki\Content\Hook
;
5 use MediaWiki\Content\ContentHandler
;
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "ContentHandlerForModelID" to register handlers implementing this interface.
11 * @stable to implement
14 interface ContentHandlerForModelIDHook
{
16 * This hook is called when a ContentHandler is requested for a given content model name,
17 * but no entry for that model exists in $wgContentHandlers. Note: if your extension implements
18 * additional models via this hook, please use GetContentModels hook to make them known to core.
22 * @param string $modelName Requested content model name
23 * @param ContentHandler &$handler Set this to a ContentHandler object, if desired
24 * @return bool|void True or no return value to continue or false to abort
26 public function onContentHandlerForModelID( $modelName, &$handler );