Jump to content

Extension:CheckUser/Hooks/CheckUserFormatRow

From mediawiki.org
CheckUserFormatRow
Available from version 1.35.0 (Gerrit change 599043)
Use this hook to modify a row in the Timeline pager for Special:Investigate.
Define function:
public static function onCheckUserFormatRow( IContextSource $context, stdClass $row, array &$rowItems ) { ... }
Attach hook:
$wgHooks['CheckUserFormatRow'][] = 'MyExtensionHooks::onCheckUserFormatRow';
Called from:File(s): CheckUser / src/TimelinePager.php
Function(s): formatRow

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

A database row in the timeline pager is rendered from the $rowItems array. First the items in the 'links' array are rendered, followed by the items in the 'info' array.

Parameters

[edit]
  • $context: An instance of IContextSource
  • $row: A stdClass Database row from the cu_changes table
  • &$rowItems: A two-dimensional array of HTML strings. The items within these arrays may be added to, removed or reordered. Any string added must be properly escaped. For convenience the HTML strings have array keys, but they are not rendered. It contains the following keys:
    • 'links'
    • 'info'