|
MediaWiki master
|
This is a hook handler interface, see docs/Hooks.md. More...
Inherited by MediaWiki\HookContainer\HookRunner.
Public Member Functions | |
| onContentModelCanBeUsedOn ( $contentModel, $title, &$ok) | |
| Use this hook to determine whether a content model can be used on a given page. | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "ContentModelCanBeUsedOn" to register handlers implementing this interface.
Definition at line 14 of file ContentModelCanBeUsedOnHook.php.
| MediaWiki\Content\Hook\ContentModelCanBeUsedOnHook::onContentModelCanBeUsedOn | ( | $contentModel, | |
| $title, | |||
| & | $ok ) |
Use this hook to determine whether a content model can be used on a given page.
This is especially useful to prevent some content models from being used in a certain location.
| string | $contentModel | Content model ID |
| Title | $title | |
| bool | &$ok | Whether it is OK to use $contentModel on $title. Handler functions that modify $ok should generally return false to prevent the remaining hooks from further modifying $ok. |
Implemented in MediaWiki\HookContainer\HookRunner.