Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / content / Hook / ContentModelCanBeUsedOnHook.php
blob95f3be02b55d0cabbdb3c191534f0e98f77ccebb
1 <?php
3 namespace MediaWiki\Content\Hook;
5 use MediaWiki\Title\Title;
7 /**
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
12 * @ingroup Hooks
14 interface ContentModelCanBeUsedOnHook {
15 /**
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
18 * certain location.
20 * @since 1.35
22 * @param string $contentModel Content model ID
23 * @param Title $title
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 );