Formatter for rendering the details of a QuantityValue (most useful for diffs) in HTML.
More...
|
| __construct (?NumberLocalizer $numberLocalizer, ValueFormatter $vocabularyUriFormatter, FormatterOptions $options=null) |
|
| format ( $value) |
|
Formatter for rendering the details of a QuantityValue (most useful for diffs) in HTML.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
-
Thiemo Kreuz
◆ __construct()
Wikibase\Lib\Formatters\QuantityDetailsFormatter::__construct |
( |
?NumberLocalizer | $numberLocalizer, |
|
|
ValueFormatter | $vocabularyUriFormatter, |
|
|
FormatterOptions | $options = null ) |
- Parameters
-
NumberLocalizer | null | $numberLocalizer | |
ValueFormatter | $vocabularyUriFormatter | |
FormatterOptions | null | $options | |
◆ format()
Wikibase\Lib\Formatters\QuantityDetailsFormatter::format |
( |
| $value | ) |
|
- See also
- ValueFormatter::format
Generates HTML representing the details of a QuantityValue, as an itemized list.
- Parameters
-
UnboundedQuantityValue | QuantityValue | $value | |
- Exceptions
-
- Returns
- string HTML
- Todo
- Display URIs to entities in the local repository as clickable labels.
- Todo
- Todo
- Display URIs that start with http:// or https:// as clickable links.
- Todo
- Todo
- Mark "unitless" units somehow, e.g. via CSS or with an appended message.
- See also
- WikibaseValueFormatterBuilders::$unitOneUris
◆ formatNumber()
Wikibase\Lib\Formatters\QuantityDetailsFormatter::formatNumber |
( |
DecimalValue | $number, |
|
|
| $unit ) |
|
private |
- Parameters
-
DecimalValue | $number | |
string | $unit | URI |
- Returns
- string HTML
◆ formatUnit()
Wikibase\Lib\Formatters\QuantityDetailsFormatter::formatUnit |
( |
| $unit | ) |
|
|
private |
- Parameters
-
- Returns
- string HTML
◆ getFieldLabel()
Wikibase\Lib\Formatters\QuantityDetailsFormatter::getFieldLabel |
( |
| $fieldName | ) |
|
|
private |
- Parameters
-
- Returns
- Message
◆ renderLabelValuePair()
Wikibase\Lib\Formatters\QuantityDetailsFormatter::renderLabelValuePair |
( |
| $fieldName, |
|
|
| $valueHtml ) |
|
private |
- Parameters
-
string | $fieldName | |
string | $valueHtml | HTML |
- Returns
- string HTML for the label/value pair
◆ $numberFormatter
Wikibase\Lib\Formatters\QuantityDetailsFormatter::$numberFormatter |
|
private |
◆ $options
Wikibase\Lib\Formatters\QuantityDetailsFormatter::$options |
|
private |
◆ $quantityFormatter
Wikibase\Lib\Formatters\QuantityDetailsFormatter::$quantityFormatter |
|
private |
◆ $vocabularyUriFormatter
Wikibase\Lib\Formatters\QuantityDetailsFormatter::$vocabularyUriFormatter |
|
private |
The documentation for this class was generated from the following file: