Open main menu

Manual:Hooks/SpecialSearchSetupEngine

< Manual:Hooks
SpecialSearchSetupEngine
Available from version 1.18.0 (r86714)
allows passing custom data to search engine
Define function:
public static function onSpecialSearchSetupEngine( $search, $profile, $engine ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"SpecialSearchSetupEngine": "MyExtensionHooks::onSpecialSearchSetupEngine"
	}
}

For MediaWiki ≤1.25:

$wgHooks['SpecialSearchSetupEngine'][] = 'MyExtensionHooks::onSpecialSearchSetupEngine';
Called from:File(s): SpecialSearch.php

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

DetailsEdit

  • $search: special page object
  • $profile: String: current search profile
  • $engine: the search engine

See alsoEdit