Jump to content

Manual:Hooks/SpecialPrefixIndexQuery

From mediawiki.org
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
SpecialPrefixIndexQuery
Available from version 1.42.0 (Gerrit change 961226)
Use this hook to modify the query used by Special:PrefixIndex.
Define function:
public static function onSpecialPrefixIndexQuery( array $fieldData, Wikimedia\Rdbms\SelectQueryBuilder $queryBuilder ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"SpecialPrefixIndexQuery": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialPrefixIndexQuery"
	}
}
Called from: File(s): Specials/SpecialPrefixIndex.php
Interface: SpecialPrefixIndexQueryHook.php

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