Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / content / Hook / ContentHandlerForModelIDHook.php
blobd996f79f9d476fd2fccd245a5e7787f4914349d2
1 <?php
3 namespace MediaWiki\Content\Hook;
5 use MediaWiki\Content\ContentHandler;
7 /**
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
12 * @ingroup Hooks
14 interface ContentHandlerForModelIDHook {
15 /**
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.
20 * @since 1.35
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 );