MediaWiki  master
MediaWiki\Search\Hook\PrefixSearchBackendHook Interface Reference
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. More...
 

Detailed Description

Deprecated:
since 1.27 Override SearchEngine::completionSearchBackend instead

Definition at line 9 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: