< Manual:Hooks 
 
      | ApiOpenSearchSuggest | |
|---|---|
| Available from version 1.25.0 Called when constructing the OpenSearch results. Hooks can alter or append to the array. | |
| Define function: | public static function onApiOpenSearchSuggest( &$results ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"ApiOpenSearchSuggest": "MyExtensionHooks::onApiOpenSearchSuggest"
	}
}
 | 
| Called from: | File(s): api/ApiOpenSearch.php | 
| Interface: | ApiOpenSearchSuggestHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ApiOpenSearchSuggest extensions.
Details
- &$results: array with integer keys to associative arrays. Keys in associative:- title: Title object.
- redirect from: Title or null.
- extract: Description for this result.
- extract trimmed: If truthy, the extract will not be trimmed to- $wgOpenSearchDescriptionLength.
- image: Thumbnail for this result. Value is an array with subkeys '- source' (url), '- width', '- height', '- alt', '- align'.
- url: Url for the given title.
 
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.