Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Search\Hook; |
4 | |
5 | /** |
6 | * This is a hook handler interface, see docs/Hooks.md. |
7 | * Use the hook name "SearchResultProvideThumbnail" to register handlers implementing this interface. |
8 | * |
9 | * Called in order to allow extensions to fill the 'thumbnail' field in search results. |
10 | * Warning: this hook is under development and still unstable. |
11 | * |
12 | * @unstable |
13 | * @ingroup Hooks |
14 | */ |
15 | interface SearchResultProvideThumbnailHook { |
16 | /** |
17 | * This hook is called when generating search results in order to fill the 'thumbnail' |
18 | * field in an extension. |
19 | * |
20 | * @since 1.35 |
21 | * |
22 | * @param array $pageIdentities Array (string=>PageIdentity) where key is pageId |
23 | * @param array &$thumbnails Output array (string=>SearchResultThumbnail|null) where key |
24 | * is pageId and value is either a valid SearchResultThumbnail for given page or null |
25 | * @param int|null $size size of thumbnail height and width in points |
26 | */ |
27 | public function onSearchResultProvideThumbnail( array $pageIdentities, &$thumbnails, ?int $size = null ); |
28 | } |