Manual:Hooks/SearchResultsAugment

SearchResultsAugment
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": "MediaWiki\\Extension\\MyExtension\\Hooks::onSearchResultsAugment"
	}
}
Called from: File(s): SearchEngine.php
Interface: SearchResultsAugmentHook.php

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


Parameters

edit
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.