Manual:Hooks/SpecialSearchSetupEngine

From Linux Web Expert

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.
SpecialSearchSetupEngine
<translate> Available from <tvar name=1><translate> version <tvar (r86714, codereview)</tvar></translate>
allows passing custom data to search engine
<translate> Define function:</translate>
public static function onSpecialSearchSetupEngine( $search, $profile, $engine ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"SpecialSearchSetupEngine": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialSearchSetupEngine"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> specials/SpecialSearch.php
<translate> Interface:</translate> SpecialSearchSetupEngineHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:SpecialSearchSetupEngine extensions</tvar>.</translate>


Details

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

See also