Debian Codegraph @

includes/content/Hook/ContentHandlerForModelIDHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Content\Hook;
4
5 use MediaWiki\Content\ContentHandler;
6
7 /**
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "ContentHandlerForModelID" to register handlers implementing this interface.
10 *
11 * @stable to implement
12 * @ingroup Hooks
13 */
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.
19 *
20 * @since 1.35
21 *
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
25 */
26 public function onContentHandlerForModelID( $modelName, &$handler );
27 }