MediaWiki REL1_40
MediaWiki\Search\SearchResultThumbnailProvider Class Reference

Find thumbnails for search results. More...

Public Member Functions

 __construct (RepoGroup $repoGroup, HookContainer $hookContainer)
 
 buildSearchResultThumbnailFromFile (File $file, int $size=null)
 Returns a SearchResultThumbnail instance for a given File/size combination.
 
 getThumbnails (array $pageIdentities, ?int $size=60)
 

Public Attributes

const THUMBNAIL_SIZE = 60
 

Detailed Description

Find thumbnails for search results.

Since
1.40

Definition at line 17 of file SearchResultThumbnailProvider.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Search\SearchResultThumbnailProvider::__construct ( RepoGroup $repoGroup,
HookContainer $hookContainer )
Parameters
RepoGroup$repoGroup
HookContainer$hookContainer

Definition at line 31 of file SearchResultThumbnailProvider.php.

Member Function Documentation

◆ buildSearchResultThumbnailFromFile()

MediaWiki\Search\SearchResultThumbnailProvider::buildSearchResultThumbnailFromFile ( File $file,
int $size = null )

Returns a SearchResultThumbnail instance for a given File/size combination.

Parameters
File$file
int | null$size
Returns
SearchResultThumbnail|null

Definition at line 66 of file SearchResultThumbnailProvider.php.

◆ getThumbnails()

MediaWiki\Search\SearchResultThumbnailProvider::getThumbnails ( array $pageIdentities,
?int $size = 60 )
Parameters
PageIdentity[]$pageIdentitiesarray that contains $pageId => PageIdentity.
int | null$sizesize of thumbnail height and width in points
Returns
SearchResultThumbnail[] array of $pageId => SearchResultThumbnail

Definition at line 90 of file SearchResultThumbnailProvider.php.

References $file.

Member Data Documentation

◆ THUMBNAIL_SIZE

const MediaWiki\Search\SearchResultThumbnailProvider::THUMBNAIL_SIZE = 60

Definition at line 19 of file SearchResultThumbnailProvider.php.


The documentation for this class was generated from the following file: