MediaWiki REL1_37
|
This is a hook handler interface, see docs/Hooks.md. More...
Public Member Functions | |
onConvertContent ( $content, $toModel, $lossy, &$result) | |
This hook is called by AbstractContent::convert when a conversion to another content model is requested. | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "ConvertContent" to register handlers implementing this interface.
Definition at line 14 of file ConvertContentHook.php.
MediaWiki\Content\Hook\ConvertContentHook::onConvertContent | ( | $content, | |
$toModel, | |||
$lossy, | |||
& | $result | ||
) |
This hook is called by AbstractContent::convert when a conversion to another content model is requested.
Handler functions that modify $result should generally return false to disable further attempts at conversion.
Content | $content | Content object to be converted |
string | $toModel | ID of the content model to convert to |
bool | $lossy | Whether lossy conversion is allowed |
Content | bool | &$result | Output parameter, in case the handler function wants to provide a converted Content object. Note that $result->getContentModel() must return $toModel. |
Implemented in MediaWiki\HookContainer\HookRunner.