|
| __construct (DataTypeRegistry $datatypeRegistry, PropertyLabelFinder $propertyLabelFinder, PropertyAliasFinder $propertyAliasFinder, array $dataTypePropertyExemptionList=array()) |
|
| getKnownPropertyTypes () |
|
| getKnownPropertyAliases () |
|
| registerProperty ($id, $typeId, $label=false, $isVisible=false, $isAnnotable=true) |
|
| registerPropertyAlias ($id, $label) |
|
| registerPropertyAliasByMsgKey ($id, $msgKey) |
|
| registerPropertyDescriptionMsgKeyById ($id, $msgKey) |
|
| findPropertyDescriptionMsgKeyById ($id) |
|
| findPropertyLabelById ($id) |
|
| findCanonicalPropertyLabelById ($id) |
|
| findPropertyLabelByLanguageCode ($id, $languageCode= '') |
|
| findPropertyLabel ($id) |
|
| getPropertyTypeId ($id) |
|
| getPredefinedPropertyTypeId ($id) |
|
| findPropertyIdByLabel ($label, $useAlias=true) |
|
| findPropertyIdFromLabelByLanguageCode ($label, $languageCode= '') |
|
| findPreferredPropertyLabelById ($id, $languageCode= '') |
|
| findPropertyId ($label, $useAlias=true) |
|
| isKnownPropertyId ($id) |
|
| isVisibleToUser ($id) |
|
| isUnrestrictedForAnnotationUse ($id) |
|
GNU GPL v2+
- Since
- 2.1
- Author
- mwjames
-
Markus Krötzsch
static SMW\PropertyRegistry::clear |
( |
| ) |
|
|
static |
SMW\PropertyRegistry::findCanonicalPropertyLabelById |
( |
|
$id | ) |
|
- Since
- 2.4
- Parameters
-
- Returns
- string
SMW\PropertyRegistry::findPreferredPropertyLabelById |
( |
|
$id, |
|
|
|
$languageCode = '' |
|
) |
| |
- Since
- 2.5
- Parameters
-
string | $id | |
string | null | $languageCode | |
- Returns
- string
SMW\PropertyRegistry::findPropertyDescriptionMsgKeyById |
( |
|
$id | ) |
|
- Since
- 2.5
- Parameters
-
- Returns
- string
SMW\PropertyRegistry::findPropertyId |
( |
|
$label, |
|
|
|
$useAlias = true |
|
) |
| |
SMW\PropertyRegistry::findPropertyIdByLabel |
( |
|
$label, |
|
|
|
$useAlias = true |
|
) |
| |
Find and return the ID for the pre-defined property of the given local label. If the label does not belong to a pre-defined property, return false.
- Parameters
-
string | $label | normalized property label |
boolean | $useAlias | determining whether to check if the label is an alias |
- Returns
- mixed string property ID or false
SMW\PropertyRegistry::findPropertyIdFromLabelByLanguageCode |
( |
|
$label, |
|
|
|
$languageCode = '' |
|
) |
| |
- Since
- 2.4
- Parameters
-
string | $label | |
string | $languageCode | |
- Returns
- mixed string property ID or false
SMW\PropertyRegistry::findPropertyLabel |
( |
|
$id | ) |
|
SMW\PropertyRegistry::findPropertyLabelById |
( |
|
$id | ) |
|
Get the translated user label for a given internal property ID. Returns empty string for properties without a translation (these are usually internal, generated by SMW but not shown to the user).
- Note
- An empty string is returned for incomplete translation (language bug) or deliberately invisible property
- Since
- 2.1
- Parameters
-
- Returns
- string
SMW\PropertyRegistry::findPropertyLabelByLanguageCode |
( |
|
$id, |
|
|
|
$languageCode = '' |
|
) |
| |
- Since
- 2.5
- Parameters
-
string | $id | |
string | $languageCode | |
- Returns
- string
static SMW\PropertyRegistry::getInstance |
( |
| ) |
|
|
static |
SMW\PropertyRegistry::getKnownPropertyAliases |
( |
| ) |
|
SMW\PropertyRegistry::getKnownPropertyTypes |
( |
| ) |
|
SMW\PropertyRegistry::getPredefinedPropertyTypeId |
( |
|
$id | ) |
|
SMW\PropertyRegistry::getPropertyTypeId |
( |
|
$id | ) |
|
Get the type ID of a predefined property, or '' if the property is not predefined. The function is guaranteed to return a type ID for keys of properties where isUserDefined() returns false.
- Parameters
-
- Returns
- string
SMW\PropertyRegistry::isKnownPropertyId |
( |
|
$id | ) |
|
- Since
- 2.1
- Parameters
-
- Returns
- boolean
SMW\PropertyRegistry::isUnrestrictedForAnnotationUse |
( |
|
$id | ) |
|
- Since
- 2.2
- Parameters
-
- Returns
- boolean
SMW\PropertyRegistry::isVisibleToUser |
( |
|
$id | ) |
|
- Since
- 2.1
- Parameters
-
- Returns
- boolean
SMW\PropertyRegistry::registerPredefinedProperties |
( |
|
$useCategoryHierarchy | ) |
|
|
protected |
- Note
- All ids must start with underscores. The translation for each ID, if any, is defined in the language files. Properties without translation cannot be entered by or displayed to users, whatever their "show" value below.
SMW\PropertyRegistry::registerProperty |
( |
|
$id, |
|
|
|
$typeId, |
|
|
|
$label = false , |
|
|
|
$isVisible = false , |
|
|
|
$isAnnotable = true |
|
) |
| |
A method for registering/overwriting predefined properties for SMW. It should be called from within the hook 'smwInitProperties' only. IDs should start with three underscores "___" to avoid current and future confusion with SMW built-ins.
- Parameters
-
string | $id | |
string | $typeId | SMW type id |
string | bool | $label | user label or false (internal property) |
boolean | $isVisible | only used if label is given, see isShown() |
boolean | $isAnnotable | |
- Note
- See self::isShown() for information it
SMW\PropertyRegistry::registerPropertyAlias |
( |
|
$id, |
|
|
|
$label |
|
) |
| |
Add a new alias label to an existing property ID. Note that every ID should have a primary label, either provided by SMW or registered with registerProperty().
- Parameters
-
$id | string id of a property |
$label | string alias label for the property |
- Note
- Always use registerProperty() for the first label. No property that has used "false" for a label on registration should have an alias.
SMW\PropertyRegistry::registerPropertyAliasByMsgKey |
( |
|
$id, |
|
|
|
$msgKey |
|
) |
| |
Register an alias using a message key to allow fetching localized labels dynamically (for when the user language is changed etc).
- Since
- 2.4
- Parameters
-
SMW\PropertyRegistry::registerPropertyDescriptionMsgKeyById |
( |
|
$id, |
|
|
|
$msgKey |
|
) |
| |
Register a description message key for allowing it to be displayed in a localized context.
- Since
- 2.5
- Parameters
-
The documentation for this class was generated from the following file: