MediaWiki REL1_35
|
Stable to implement. 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. | |
Stable to implement.
Definition at line 11 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.