MediaWiki master
|
This is a hook handler interface, see docs/Hooks.md. More...
Inherited by MediaWiki\HookContainer\HookRunner.
Public Member Functions | |
onGetRelativeTimestamp (&$output, &$diff, $timestamp, $relativeTo, $user, $lang) | |
Use this hook to pre-emptively override the relative timestamp generated by MWTimestamp::getRelativeTimestamp(). | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "GetRelativeTimestamp" to register handlers implementing this interface.
Definition at line 17 of file GetRelativeTimestampHook.php.
MediaWiki\Hook\GetRelativeTimestampHook::onGetRelativeTimestamp | ( | & | $output, |
& | $diff, | ||
$timestamp, | |||
$relativeTo, | |||
$user, | |||
$lang ) |
Use this hook to pre-emptively override the relative timestamp generated by MWTimestamp::getRelativeTimestamp().
string | &$output | String for the output timestamp |
DateInterval | &$diff | Difference between the timestamps |
MWTimestamp | $timestamp | Current (user-adjusted) timestamp |
MWTimestamp | $relativeTo | Relative (user-adjusted) timestamp |
User | $user | User whose preferences are being used to make timestamp |
Language | $lang | Language that will be used to render the timestamp |
Implemented in MediaWiki\HookContainer\HookRunner.