Merge "jquery.tablesorter: Silence an expected "sort-rowspan-error" warning"
[mediawiki.git] / includes / api / Hook / ApiOpenSearchSuggestHook.php
blob90ac4a8eddaedb83141bd9245008d5a51555c24d
1 <?php
3 namespace MediaWiki\Api\Hook;
5 /**
6 * This is a hook handler interface, see docs/Hooks.md.
7 * Use the hook name "ApiOpenSearchSuggest" to register handlers implementing this interface.
9 * @stable to implement
10 * @ingroup Hooks
12 interface ApiOpenSearchSuggestHook {
13 /**
14 * This hook is called when constructing the OpenSearch results. Hooks
15 * can alter or append to the array.
17 * @since 1.35
19 * @param array[] &$results Array with integer keys to associative arrays.
20 * Keys in associative array:
21 * - `title`: Title object
22 * - `redirect from`: Title or null
23 * - `extract`: Description for this result
24 * - `extract trimmed`: If truthy, the extract will not be trimmed to
25 * $wgOpenSearchDescriptionLength.
26 * - `image`: Thumbnail for this result. Value is an array with subkeys `source`
27 * (URL), `width`, `height`, `alt`, and `align`.
28 * - `url`: URL for the given title
29 * @return bool|void True or no return value to continue or false to abort
31 public function onApiOpenSearchSuggest( &$results );