Inherits SMWDataValue.
Public Member Functions | |
| setOutputFormat ($formatstring) | |
| Define a particular output format. | |
| getShortWikiText ($linked=null) | |
| Returns a short textual representation for this data value. | |
| getShortHTMLText ($linker=null) | |
| Returns a short textual representation for this data value. | |
| getLongWikiText ($linked=null) | |
| Return the long textual description of the value, as printed for example in the factbox. | |
| getLongHTMLText ($linker=null) | |
| Return the long textual description of the value, as printed for example in the factbox. | |
| getWikiValue () | |
| Return the plain wiki version of the value, or FALSE if no such version is available. | |
| getBoolean () | |
Protected Member Functions | |
| parseUserValue ($value) | |
| Initialise the datavalue from the given value string. | |
| loadDataItem (SMWDataItem $dataItem) | |
| getStandardCaption ($useformat) | |
| Get text for displaying the value of this property, or false if not valid. | |
Protected Attributes | |
| $m_truecaption | |
| $m_falsecaption | |
Definition at line 13 of file SMW_DV_Bool.php.
| SMWBoolValue::parseUserValue | ( | $ | value | ) | [protected] |
Initialise the datavalue from the given value string.
The format of this strings might be any acceptable user input and especially includes the output of getWikiValue().
| string | $value |
Reimplemented from SMWDataValue.
Definition at line 27 of file SMW_DV_Bool.php.
References SMWDataValue::addError().
| SMWBoolValue::loadDataItem | ( | SMWDataItem $ | dataItem | ) | [protected] |
| $dataitem | SMWDataItem |
Reimplemented from SMWDataValue.
Definition at line 54 of file SMW_DV_Bool.php.
References getStandardCaption(), and SMWDataItem::TYPE_BOOLEAN.
| SMWBoolValue::setOutputFormat | ( | $ | formatString | ) |
Define a particular output format.
Output formats are user-supplied strings that the datavalue may (or may not) use to customise its return value. For example, quantities with units of measurement may interpret the string as a desired output unit. In other cases, the output format might be built-in and subject to internationalisation (which the datavalue has to implement). In any case, an empty string resets the output format to the default.
There is one predeeind output format that all datavalues should respect: the format '-' indicates "plain" output that is most useful for further processing the value in a template. It should not use any wiki markup or beautification, and it should also avoid localization to the current language. When users explicitly specify an empty format string in a query, it is normalized to "-" to avoid confusion. Note that empty format strings are not interpreted in this way when directly passed to this function.
| string | $formatString |
Reimplemented from SMWDataValue.
Definition at line 64 of file SMW_DV_Bool.php.
References getStandardCaption().
| SMWBoolValue::getShortWikiText | ( | $ | linked = null |
) |
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 parameter $linked controls linking of values such as titles and should be non-NULL and non-false if this is desired.
Reimplemented from SMWDataValue.
Definition at line 87 of file SMW_DV_Bool.php.
| SMWBoolValue::getShortHTMLText | ( | $ | linker = null |
) |
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.
The parameter $linker controls linking of values such as titles and should be some Linker object (or NULL for no linking).
Reimplemented from SMWDataValue.
Definition at line 91 of file SMW_DV_Bool.php.
| SMWBoolValue::getLongWikiText | ( | $ | linked = null |
) |
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 a wiki-source string.
The parameter $linked controls linking of values such as titles and should be non-NULL and non-false if this is desired.
Reimplemented from SMWDataValue.
Definition at line 95 of file SMW_DV_Bool.php.
References SMWDataValue::getErrorText(), getStandardCaption(), and SMWDataValue::isValid().
| SMWBoolValue::getLongHTMLText | ( | $ | linker = null |
) |
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.
The parameter $linker controls linking of values such as titles and should be some Linker object (or NULL for no linking).
Reimplemented from SMWDataValue.
Definition at line 99 of file SMW_DV_Bool.php.
References SMWDataValue::getErrorText(), getStandardCaption(), and SMWDataValue::isValid().
| SMWBoolValue::getWikiValue | ( | ) |
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 setUserValue().
Reimplemented from SMWDataValue.
Definition at line 103 of file SMW_DV_Bool.php.
References getStandardCaption().
| SMWBoolValue::getBoolean | ( | ) |
Definition at line 107 of file SMW_DV_Bool.php.
| SMWBoolValue::getStandardCaption | ( | $ | useformat | ) | [protected] |
Get text for displaying the value of this property, or false if not valid.
| $useformat | bool, true if the output format should be used, false if the returned text should be parsable |
Definition at line 117 of file SMW_DV_Bool.php.
References SMWDataValue::isValid().
Referenced by getLongHTMLText(), getLongWikiText(), getWikiValue(), loadDataItem(), and setOutputFormat().
SMWBoolValue::$m_truecaption [protected] |
Definition at line 19 of file SMW_DV_Bool.php.
SMWBoolValue::$m_falsecaption [protected] |
Definition at line 25 of file SMW_DV_Bool.php.
1.5.6