Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | Protected Attributes | List of all members
SMW\DataValues\ValueFormatters\DataValueFormatter Class Reference
Inheritance diagram for SMW\DataValues\ValueFormatters\DataValueFormatter:
Inheritance graph
[legend]
Collaboration diagram for SMW\DataValues\ValueFormatters\DataValueFormatter:
Collaboration graph
[legend]

Public Member Functions

 __construct (DataValue $dataValue=null)
 
 isFormatterFor (DataValue $dataValue)
 
 setDataValue (DataValue $dataValue)
 
 getErrors ()
 
 setOption ( $key, $value)
 
 getOption ( $key)
 
- Public Member Functions inherited from SMW\DataValues\ValueFormatters\ValueFormatter
 format ( $type, $linker=null)
 

Public Attributes

const VALUE = 0
 
const WIKI_SHORT = 1
 
const HTML_SHORT = 2
 
const WIKI_LONG = 3
 
const HTML_LONG = 4
 

Protected Attributes

 $dataValue
 

Detailed Description

GNU GPL v2+

Since
2.4
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\DataValues\ValueFormatters\DataValueFormatter::__construct ( DataValue  $dataValue = null)
Since
2.4
Parameters
DataValue | null$dataValue

Member Function Documentation

◆ getErrors()

SMW\DataValues\ValueFormatters\DataValueFormatter::getErrors ( )
Since
2.4
Returns
array

◆ getOption()

SMW\DataValues\ValueFormatters\DataValueFormatter::getOption (   $key)
Since
2.4
Parameters
string$key
Returns
mixed|false

◆ isFormatterFor()

SMW\DataValues\ValueFormatters\DataValueFormatter::isFormatterFor ( DataValue  $dataValue)
abstract
Since
2.4
Parameters
DataValue$dataValue
Returns
boolean

◆ setDataValue()

SMW\DataValues\ValueFormatters\DataValueFormatter::setDataValue ( DataValue  $dataValue)
Since
2.4
Parameters
DataValue$dataValue

◆ setOption()

SMW\DataValues\ValueFormatters\DataValueFormatter::setOption (   $key,
  $value 
)
Since
2.4
Parameters
string$key
mixed$value

Member Data Documentation

◆ HTML_LONG

const SMW\DataValues\ValueFormatters\DataValueFormatter::HTML_LONG = 4

Return the long textual description of the value, as printed for example in the factbox. If errors occurred, return the error message The result always is an HTML string.

◆ HTML_SHORT

const SMW\DataValues\ValueFormatters\DataValueFormatter::HTML_SHORT = 2

Returns a short textual representation for this data value. If the value was initialised from a user supplied string, then this original string should be reflected in this short version (i.e. no normalisation should normally happen). There might, however, be additional parts such as code for generating tooltips. The output is in HTML text.

◆ VALUE

const SMW\DataValues\ValueFormatters\DataValueFormatter::VALUE = 0

Return the plain wiki version of the value, or FALSE if no such version is available. The returned string suffices to reobtain the same DataValue when passing it as an input string to DataValue::setUserValue.

◆ WIKI_LONG

const SMW\DataValues\ValueFormatters\DataValueFormatter::WIKI_LONG = 3

Return the long textual description of the value, as printed for example in the factbox. If errors occurred, return the error message. The result is always a wiki-source string.

◆ WIKI_SHORT

const SMW\DataValues\ValueFormatters\DataValueFormatter::WIKI_SHORT = 1

Returns a short textual representation for this data value. If the value was initialised from a user supplied string, then this original string should be reflected in this short version (i.e. no normalisation should normally happen). There might, however, be additional parts such as code for generating tooltips. The output is in wiki text.


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

About | General disclaimer | Privacy policy