Jump to navigation Jump to search
Available from version 1.28.0
Allows extension to add its code to the list of search result augmentors.
Define function:
public static function onSearchResultsAugment( array &$setAugmentors, array &$rowAugmentors ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"SearchResultsAugment": "MyExtensionHooks::onSearchResultsAugment"

For MediaWiki ≤1.25:

$wgHooks['SearchResultsAugment'][] = 'MyExtensionHooks::onSearchResultsAugment';
Called from:File(s): SearchEngine.php

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


Parameter/Option Description
array &$setAugmentors List of whole-set augmentor objects, must implement ResultSetAugmentor
array &$rowAugmentors List of per-row augmentor objects, must implement ResultAugmentor

Note that lists should be in the format name => object and the names in both lists should be distinct.