Semantic MediaWiki and related extensions
|
Public Member Functions | |
__construct ( $typeid=self::TYPE_ID) | |
__clone () | |
getInceptiveProperty () | |
getPreferredLabel () | |
setLinkAttributes (array $linkAttributes) | |
setCaption ( $caption) | |
setOutputFormat ( $formatstring) | |
setInverse ( $isinverse) | |
getWikiPageValue () | |
isVisible () | |
isRestricted () | |
getShortWikiText ( $linker=null) | |
getShortHTMLText ( $linker=null) | |
getLongWikiText ( $linker=null) | |
getLongHTMLText ( $linker=null) | |
getWikiValue () | |
getFormattedLabel ( $format=DataValueFormatter::VALUE, $linker=null) | |
getSearchLabel () | |
getPropertyTypeID () | |
Public Member Functions inherited from SMWDataValue | |
__construct ( $typeid) | |
getTypeID () | |
setUserValue ( $value, $caption=false) | |
setDataItem (SMWDataItem $dataItem) | |
setDataValueServiceFactory (DataValueServiceFactory $dataValueServiceFactory) | |
setProperty (DIProperty $property) | |
getProperty () | |
setContextPage (SMWDIWikiPage $contextPage=null) | |
getContextPage () | |
setCaption ( $caption) | |
getCaption () | |
getPreferredCaption () | |
setOutputFormat ( $formatString) | |
getOutputFormat () | |
addError ( $error) | |
addErrorMsg ( $error, $type=Message::TEXT) | |
getErrorText () | |
getErrors () | |
getErrorsByType ( $type=null) | |
getRestrictionError () | |
clearErrors () | |
getQueryDescription ( $value) | |
getDataItem () | |
__toString () | |
getShortWikiText ( $linker=null) | |
getShortHTMLText ( $linker=null) | |
getLongWikiText ( $linker=null) | |
getLongHTMLText ( $linker=null) | |
getWikiValue () | |
getShortText ( $outputFormat, $linker=null) | |
getLongText ( $outputFormat, $linker=null) | |
getInfolinkText ( $outputFormat, $linker=null) | |
getInfolinks () | |
getHash () | |
isNumeric () | |
isValid () | |
canUse () | |
isRestricted () | |
addCallable ( $key, callable $callable) | |
hasCallable ( $key) | |
getCallable ( $key) | |
clearCallable ( $key) | |
copyOptions (Options $options=null) | |
setOption ( $key, $value) | |
getOption ( $key, $default=false) | |
hasFeature ( $feature) | |
isEnabledFeature ( $feature) | |
checkConstraints () | |
Public Attributes | |
const | TYPE_ID = '__pro' |
const | OPT_NO_HIGHLIGHT = 'no.highlight' |
const | OPT_HIGHLIGHT_LINKER = 'highlight.linker' |
const | OPT_NO_PREF_LHNT = 'no.preflabel.marker' |
const | OPT_CANONICAL_LABEL = 'canonical.label' |
const | FORMAT_LABEL = 'format.label' |
const | SEARCH_LABEL = 'search.label' |
Public Attributes inherited from SMWDataValue | |
const | OPT_USER_LANGUAGE = 'user.language' |
const | OPT_CONTENT_LANGUAGE = 'content.language' |
const | OPT_QUERY_CONTEXT = 'query.context' |
const | OPT_QUERY_COMP_CONTEXT = 'query.comparator.context' |
const | OPT_DISABLE_INFOLINKS = 'disable.infolinks' |
const | OPT_DISABLE_SERVICELINKS = 'disable.servicelinks' |
const | OPT_COMPACT_INFOLINKS = 'compact.infolinks' |
Protected Member Functions | |
parseUserValue ( $value) | |
loadDataItem (DataItem $dataItem) | |
Protected Member Functions inherited from SMWDataValue | |
getOptions () | |
parseUserValue ( $value) | |
loadDataItem (SMWDataItem $dataItem) | |
getServiceLinkParams () | |
checkAllowedValues () | |
Protected Attributes | |
$m_wikipage = null | |
$linkAttributes = [] | |
Protected Attributes inherited from SMWDataValue | |
$m_dataitem | |
$m_property = null | |
$m_contextPage = null | |
$m_caption | |
$m_typeid | |
$m_outformat = false | |
$restrictionError = false | |
$dataValueServiceFactory | |
Additional Inherited Members | |
Static Public Member Functions inherited from SMWDataValue | |
static | prepareValue (&$value, &$comparator) |
Objects of this class represent properties in SMW.
This class represents both normal (user-defined) properties and predefined ("special") properties. Predefined properties may still have a standard label (and associated wiki article) and they will behave just like user-defined properties in most cases (e.g. when asking for a printout text, a link to the according page is produced).
It is possible that predefined properties have no visible label at all, if they are used only internally and never specified by or shown to the user. Those will use their internal ID as DB key, and empty texts for most printouts. All other properties use their canonical DB key (even if they are predefined and have an id).
Functions are provided to check whether a property is visible or user-defined, and to get the internal ID, if any.
GNU GPL v2+
SMW\DataValues\PropertyValue::__construct | ( | $typeid = self::TYPE_ID | ) |
string | $typeid |
SMW\DataValues\PropertyValue::__clone | ( | ) |
We use the internal wikipage object to store some of this objects data. Clone it to make sure that data can be modified independently from the original object's content.
SMW\DataValues\PropertyValue::getFormattedLabel | ( | $format = DataValueFormatter::VALUE , |
|
$linker = null |
|||
) |
Outputs a formatted property label that takes into account preferred/ canonical label characteristics
integer | string | $format | |
Linker | null | $linker |
SMW\DataValues\PropertyValue::getInceptiveProperty | ( | ) |
SMW\DataValues\PropertyValue::getLongHTMLText | ( | $linker = null | ) |
SMW\DataValues\PropertyValue::getLongWikiText | ( | $linker = null | ) |
SMW\DataValues\PropertyValue::getPreferredLabel | ( | ) |
SMW\DataValues\PropertyValue::getPropertyTypeID | ( | ) |
Convenience method to find the type id of this property. Most callers should rather use DIProperty::findPropertyTypeId() directly. Note that this is not the same as getTypeID(), which returns the id of this property datavalue.
SMW\DataValues\PropertyValue::getSearchLabel | ( | ) |
Outputs a label that corresponds to the display and sort characteristics ( e.g. display title etc.) and can be used to initiate a match and search process.
SMW\DataValues\PropertyValue::getShortHTMLText | ( | $linker = null | ) |
SMW\DataValues\PropertyValue::getShortWikiText | ( | $linker = null | ) |
SMW\DataValues\PropertyValue::getWikiPageValue | ( | ) |
Return a wiki page value that can be used for displaying this property, or null if no such wiki page exists (for predefined properties without any label).
SMW\DataValues\PropertyValue::getWikiValue | ( | ) |
SMW\DataValues\PropertyValue::isRestricted | ( | ) |
SMW\DataValues\PropertyValue::isVisible | ( | ) |
Return TRUE if this is a property that can be displayed, and not a pre-defined property that is used only internally and does not even have a user-readable name.
|
protected |
|
protected |
Extended parsing function to first check whether value refers to pre-defined property, resolve aliases, and set internal property id accordingly.
SMW\DataValues\PropertyValue::setLinkAttributes | ( | array | $linkAttributes | ) |
array | $linkAttributes |
const SMW\DataValues\PropertyValue::FORMAT_LABEL = 'format.label' |
Special formatting of the label/preferred label
const SMW\DataValues\PropertyValue::OPT_CANONICAL_LABEL = 'canonical.label' |
Indicates to use a canonical label
const SMW\DataValues\PropertyValue::OPT_HIGHLIGHT_LINKER = 'highlight.linker' |
Use linker with the highlighter
const SMW\DataValues\PropertyValue::OPT_NO_HIGHLIGHT = 'no.highlight' |
Avoid the display of a tooltip
const SMW\DataValues\PropertyValue::OPT_NO_PREF_LHNT = 'no.preflabel.marker' |
Avoid the display of a preferred label marker
const SMW\DataValues\PropertyValue::SEARCH_LABEL = 'search.label' |
Label to be used for matching a DB search
const SMW\DataValues\PropertyValue::TYPE_ID = '__pro' |
DV identifier