Manual:Hooks/EnhancedChangesListModifyLineData

From MediaWiki.org
Jump to navigation Jump to search
EnhancedChangesListModifyLineData
Available from version 1.26.0
Modify data used to build a grouped recent change inner line in Special:RecentChanges
Define function:
public static function onEnhancedChangesListModifyLineData( $changesList, &$data, $block, $rc ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"EnhancedChangesListModifyLineData": "MyExtensionHooks::onEnhancedChangesListModifyLineData"
	}
}

For MediaWiki ≤1.25:

$wgHooks['EnhancedChangesListModifyLineData'][] = 'MyExtensionHooks::onEnhancedChangesListModifyLineData';
Called from:File(s): changes/EnhancedChangesList.php
Function(s): getLineData

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

Details[edit]

Allows extensions to modify the data used to build a grouped recent change inner line in Special:RecentChanges

  • $changesList: EnhancedChangesList object
  • &$data: An array with all the components that will be joined in order to create the line
  • $block: An array of RecentChange objects in that group
  • $rc: The RecentChange object for this line