MediaWiki REL1_37
MediaWiki\Search\Hook\PrefixSearchBackendHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Search\Hook\PrefixSearchBackendHook:

Public Member Functions

 onPrefixSearchBackend ( $ns, $search, $limit, &$results, $offset)
 Use this hook to override the title prefix search used for OpenSearch and AJAX search suggestions.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "PrefixSearchBackend" to register handlers implementing this interface.

Deprecated:
since 1.27 Override SearchEngine::completionSearchBackend instead

Definition at line 12 of file PrefixSearchBackendHook.php.

Member Function Documentation

◆ onPrefixSearchBackend()

MediaWiki\Search\Hook\PrefixSearchBackendHook::onPrefixSearchBackend (   $ns,
  $search,
  $limit,
$results,
  $offset 
)

Use this hook to override the title prefix search used for OpenSearch and AJAX search suggestions.

Put results into &$results outparam and return false.

Since
1.35
Parameters
int[]$nsArray of int namespace keys to search in
string$searchSearch term (not guaranteed to be conveniently normalized)
int$limitMaximum number of results to return
string[]&$resultsOut param: array of page names
int$offsetNumber of results to offset from the beginning
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: