MediaWiki  master
GetRelativeTimestampHook.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki\Hook;
4 
5 use DateInterval;
6 use Language;
7 use MWTimestamp;
8 use User;
9 
32  public function onGetRelativeTimestamp( &$output, &$diff, $timestamp,
33  $relativeTo, $user, $lang
34  );
35 }
MWTimestamp
Library for creating and parsing MW-style timestamps.
Definition: MWTimestamp.php:34
MediaWiki\Hook
Definition: ActionBeforeFormDisplayHook.php:3
$lang
if(!isset( $args[0])) $lang
Definition: testCompression.php:37
User
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:63
MediaWiki\Hook\GetRelativeTimestampHook\onGetRelativeTimestamp
onGetRelativeTimestamp(&$output, &$diff, $timestamp, $relativeTo, $user, $lang)
Use this hook to pre-emptively override the relative timestamp generated by MWTimestamp::getRelativeT...
Language
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
Definition: Language.php:42
MediaWiki\Hook\GetRelativeTimestampHook
This is a hook handler interface, see docs/Hooks.md.
Definition: GetRelativeTimestampHook.php:17