Formats the StringValue from a "commonsMedia" snak as a HTML thumbnail and a link to commons.
More...
|
| __construct (ParserOptions $parserOptions, array $thumbLimits, FormatterOptions $options=null, RepoGroup $repoGroup=null) |
|
| format ( $value) |
|
Formats the StringValue from a "commonsMedia" snak as a HTML thumbnail and a link to commons.
- Copyright
- GPL-2.0-or-later
- Author
- Adrian Heine
-
Marius Hoch
◆ __construct()
Wikibase\Lib\Formatters\CommonsInlineImageFormatter::__construct |
( |
ParserOptions |
$parserOptions, |
|
|
array |
$thumbLimits, |
|
|
FormatterOptions |
$options = null , |
|
|
RepoGroup |
$repoGroup = null |
|
) |
| |
- Parameters
-
ParserOptions | $parserOptions | Options for thumbnail size |
array | $thumbLimits | Mapping of thumb number to the limit like [ 0 => 120, 1 => 240, ...] |
FormatterOptions | null | $options | |
RepoGroup | null | $repoGroup | |
- Exceptions
-
◆ format()
Wikibase\Lib\Formatters\CommonsInlineImageFormatter::format |
( |
|
$value | ) |
|
- See also
- ValueFormatter::format
Formats the given commons file name as an HTML image gallery.
- Parameters
-
StringValue | $value | The commons file name |
- Exceptions
-
- Returns
- string HTML
◆ getCaptionHtml()
Wikibase\Lib\Formatters\CommonsInlineImageFormatter::getCaptionHtml |
( |
Title |
$title, |
|
|
|
$file = null |
|
) |
| |
|
private |
- Parameters
-
Title | $title | |
File | null | $file | |
- Returns
- string HTML
◆ getFileMetaHtml()
Wikibase\Lib\Formatters\CommonsInlineImageFormatter::getFileMetaHtml |
( |
File |
$file | ) |
|
|
private |
- Parameters
-
- Returns
- string HTML
◆ getThumbWidth()
Wikibase\Lib\Formatters\CommonsInlineImageFormatter::getThumbWidth |
( |
|
$thumbSize | ) |
|
|
private |
◆ wrapThumb()
Wikibase\Lib\Formatters\CommonsInlineImageFormatter::wrapThumb |
( |
Title |
$title, |
|
|
|
$thumbHtml |
|
) |
| |
|
private |
- Parameters
-
Title | $title | |
string | $thumbHtml | |
- Returns
- string HTML
◆ $language
Wikibase\Lib\Formatters\CommonsInlineImageFormatter::$language |
|
private |
◆ $parserOptions
Wikibase\Lib\Formatters\CommonsInlineImageFormatter::$parserOptions |
|
private |
◆ $repoGroup
Wikibase\Lib\Formatters\CommonsInlineImageFormatter::$repoGroup |
|
private |
◆ $thumbLimits
Wikibase\Lib\Formatters\CommonsInlineImageFormatter::$thumbLimits |
|
private |
◆ FALLBACK_THUMBNAIL_WIDTH
const Wikibase\Lib\Formatters\CommonsInlineImageFormatter::FALLBACK_THUMBNAIL_WIDTH = 320 |
|
private |
The documentation for this class was generated from the following file: