Wikibase
MediaWiki Wikibase extension
Wikibase\Lib\Formatters\CommonsLinkFormatter Class Reference

Formats the StringValue from a "commonsMedia" snak as an HTML link pointing to the file description page on Wikimedia Commons. More...

+ Inheritance diagram for Wikibase\Lib\Formatters\CommonsLinkFormatter:
+ Collaboration diagram for Wikibase\Lib\Formatters\CommonsLinkFormatter:

Public Member Functions

 __construct (FormatterOptions $options=null)
 
 format ( $value)
 

Private Attributes

 $attributes
 

Detailed Description

Formats the StringValue from a "commonsMedia" snak as an HTML link pointing to the file description page on Wikimedia Commons.

Todo:
Use MediaWiki renderer
Author
Adrian Heine adria.nosp@m.n.he.nosp@m.ine@w.nosp@m.ikim.nosp@m.edia..nosp@m.de

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Formatters\CommonsLinkFormatter::__construct ( FormatterOptions  $options = null)
Parameters
FormatterOptions | null$options

Member Function Documentation

◆ format()

Wikibase\Lib\Formatters\CommonsLinkFormatter::format (   $value)
See also
ValueFormatter::format

Formats the given commons file name as an HTML link

Parameters
StringValue$valueThe commons file name to turn into a link
Exceptions
InvalidArgumentException
Returns
string HTML

Member Data Documentation

◆ $attributes

Wikibase\Lib\Formatters\CommonsLinkFormatter::$attributes
private

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