Extension:SphinxSearch/SphinxSearchBeforeResults
SphinxSearchBeforeResults | |
---|---|
Available from version 0.7.2 (r73342, codereview) Allow messing with various search parameters before search client is instantiated | |
Define function: | public static function onSphinxSearchBeforeResults( &$term, &$offset, &$namespaces, &$categories, &$exc_categories ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"SphinxSearchBeforeResults": "MediaWiki\\Extension\\MyExtension\\Hooks::onSphinxSearchBeforeResults"
}
}
|
Called from: | File(s): SphinxMWSearch.php |
Interface: | SphinxSearchBeforeResultsHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:SphinxSearchBeforeResults extensions.
Details edit
- $term: string search term(s)
- $offset: integer results page offset
- $namespaces: array of namespace ids to include
- $categories: array of category ids to include
- $exc_categories: array of category ids to exclude