MediaWiki master
MediaWiki\Search\Hook\PrefixSearchExtractNamespaceHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onPrefixSearchExtractNamespace (&$namespaces, &$search)
 This hook is called if core was not able to extract a namespace from the search string so that extensions can attempt it.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 12 of file PrefixSearchExtractNamespaceHook.php.

Member Function Documentation

◆ onPrefixSearchExtractNamespace()

MediaWiki\Search\Hook\PrefixSearchExtractNamespaceHook::onPrefixSearchExtractNamespace ( & $namespaces,
& $search )

This hook is called if core was not able to extract a namespace from the search string so that extensions can attempt it.

Since
1.35
Parameters
int[]&$namespacesArray of int namespace keys to search in (change this if you can extract namespaces)
string&$searchSearch term (replace this with term without the namespace if you can extract one)
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: