Inherits SMWDataValue.
Public Member Functions | |
| getShortWikiText ($linker=null) | |
| Returns a short textual representation for this data value. | |
| getShortHTMLText ($linker=null) | |
| Returns a short textual representation for this data value. | |
| getLongWikiText ($linker=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. | |
| getHash () | |
| Return a string that identifies the value of the object, and that can be used to compare different value objects. | |
| getDBkey () | |
| This class uses type ids as DB keys. | |
| isBuiltIn () | |
| Is this a built-in datatype shipped with SMW (or an extension of SMW)? (Alternatively it would be a user-defined derived datatype. | |
| isAlias () | |
| Is this an alias for another datatype in SMW? This information is used to explain entries in Special:Types that are found since they have pages. | |
Static Public Member Functions | |
| static | newFromTypeId ($typeId) |
| static | getTypeUriFromTypeId ($typeId) |
Protected Member Functions | |
| parseUserValue ($value) | |
| Initialise the datavalue from the given value string. | |
| loadDataItem (SMWDataItem $dataItem) | |
| getSpecialPageTitleText () | |
| Gets the title text for the types special page. | |
Protected Attributes | |
| $m_isAlias | |
| $m_realLabel | |
| $m_givenLabel | |
| $m_typeId | |
Types behave largely like values of type SMWWikiPageValue with three main differences. First, they actively check if a value is an alias for another type, modifying the internal representation accordingly. Second, they have a modified display for emphasizing if some type is defined in SMW (built-in). Third, they use type ids for storing data (DB keys) instead of using page titles.
Definition at line 19 of file SMW_DV_Types.php.
| static SMWTypesValue::newFromTypeId | ( | $ | typeId | ) | [static] |
Definition at line 25 of file SMW_DV_Types.php.
Referenced by SMWUnusedPropertiesPage::formatResult(), SMWPropertiesPage::formatResult(), SMWSpecialTypes::getTypesList(), and SMWPropertyValue::getTypesValue().
| static SMWTypesValue::getTypeUriFromTypeId | ( | $ | typeId | ) | [static] |
Definition at line 36 of file SMW_DV_Types.php.
Referenced by SMWCompatibilityHelpers::dataItemFromDBKeys().
| SMWTypesValue::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 40 of file SMW_DV_Types.php.
References SMWDataValue::addError(), SMWDataValueFactory::findTypeID(), SMWDataValueFactory::findTypeLabel(), and smwfNormalTitleText().
| SMWTypesValue::loadDataItem | ( | SMWDataItem $ | dataItem | ) | [protected] |
| $dataitem | SMWDataItem |
Reimplemented from SMWDataValue.
Definition at line 80 of file SMW_DV_Types.php.
References SMWDataValueFactory::findTypeLabel().
| SMWTypesValue::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 95 of file SMW_DV_Types.php.
References getSpecialPageTitleText().
| SMWTypesValue::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 106 of file SMW_DV_Types.php.
References getSpecialPageTitleText().
| SMWTypesValue::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 115 of file SMW_DV_Types.php.
References getSpecialPageTitleText().
| SMWTypesValue::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 126 of file SMW_DV_Types.php.
References getSpecialPageTitleText().
| SMWTypesValue::getSpecialPageTitleText | ( | ) | [protected] |
Gets the title text for the types special page.
Takes care of compatibility changes in MW 1.17 and 1.18. 1.17 introduces SpecialPageFactory 1.18 deprecates SpecialPage::getLocalNameFor
Definition at line 145 of file SMW_DV_Types.php.
Referenced by getLongHTMLText(), getLongWikiText(), getShortHTMLText(), and getShortWikiText().
| SMWTypesValue::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 151 of file SMW_DV_Types.php.
| SMWTypesValue::getHash | ( | ) |
Return a string that identifies the value of the object, and that can be used to compare different value objects.
Possibly overwritten by subclasses (e.g. to ensure that returned value is normalized first)
Reimplemented from SMWDataValue.
Definition at line 155 of file SMW_DV_Types.php.
| SMWTypesValue::getDBkey | ( | ) |
This class uses type ids as DB keys.
Definition at line 164 of file SMW_DV_Types.php.
References SMWDataValueFactory::findTypeID(), and SMWDataValue::isValid().
| SMWTypesValue::isBuiltIn | ( | ) |
Is this a built-in datatype shipped with SMW (or an extension of SMW)? (Alternatively it would be a user-defined derived datatype.
)
Definition at line 174 of file SMW_DV_Types.php.
| SMWTypesValue::isAlias | ( | ) |
Is this an alias for another datatype in SMW? This information is used to explain entries in Special:Types that are found since they have pages.
Definition at line 184 of file SMW_DV_Types.php.
SMWTypesValue::$m_isAlias [protected] |
Definition at line 20 of file SMW_DV_Types.php.
SMWTypesValue::$m_realLabel [protected] |
Definition at line 21 of file SMW_DV_Types.php.
SMWTypesValue::$m_givenLabel [protected] |
Definition at line 22 of file SMW_DV_Types.php.
SMWTypesValue::$m_typeId [protected] |
Definition at line 23 of file SMW_DV_Types.php.
1.5.6