Manual:Hooks/LogEventsListShowLogExtract

LogEventsListShowLogExtract
Available from version 1.19.0 (r97342, codereview)
Called before the result of LogEventsList::showLogExtract() is added to OutputPage.
Define function:
public static function onLogEventsListShowLogExtract( &$s, $types, $page, $user, $param ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"LogEventsListShowLogExtract": "MediaWiki\\Extension\\MyExtension\\Hooks::onLogEventsListShowLogExtract"
	}
}
Called from: File(s): logging/LogEventsList.php
Interface: LogEventsListShowLogExtractHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:LogEventsListShowLogExtract extensions.


Details

edit

Returning false will prevent the string from being added to the OutputPage

  • &$s: HTML string to show for the log extract
  • $types: String or array of log types of to show.
  • $page: String of the page title to show log entries for
  • $user: String of the user who made the log entries
  • $param: Associative array with the following additional options:
    • $params['lim']: Integer Limit of items to show, default is 50
    • $params['conds']: Array Extra conditions for the query (e.g. "log_action != 'revision'")
    • $params['showIfEmpty']: boolean Set to false if you don't want any output in case the loglist is empty if set to true (default), "No matching items in log" is displayed if loglist is empty
    • $params['msgKey']: Array If you want a nice box with a message, set this to the key of the message. First element is the message key, additional optional elements are parameters for the key that are processed with wgMsgExt and option 'parse'
    • $params['offset']: Set to overwrite offset parameter in $wgRequest set to '' to unset offset
    • $params['wrap']: String Wrap the message in html (usually something like "<div ...>$1</div>").
    • $params['flags']: Integer display flags (NO_ACTION_LINK,NO_EXTRA_USER_LINKS)