< Manual:Hooks
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": "MyExtensionHooks::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

Parameter/OptionDescription
array &$setAugmentorsList of whole-set augmentor objects, must implement ResultSetAugmentor
array &$rowAugmentorsList 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.

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.