3 namespace MediaWiki\Content\Hook
;
5 use MediaWiki\Title\Title
;
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "ContentModelCanBeUsedOn" to register handlers implementing this interface.
11 * @stable to implement
14 interface ContentModelCanBeUsedOnHook
{
16 * Use this hook to determine whether a content model can be used on a given page.
17 * This is especially useful to prevent some content models from being used in a
22 * @param string $contentModel Content model ID
24 * @param bool &$ok Whether it is OK to use $contentModel on $title.
25 * Handler functions that modify $ok should generally return false to prevent
26 * the remaining hooks from further modifying $ok.
27 * @return bool|void True or no return value to continue or false to abort
29 public function onContentModelCanBeUsedOn( $contentModel, $title, &$ok );