Content object for articles representing Wikibase properties.
More...
◆ __construct()
Wikibase\Repo\Content\PropertyContent::__construct |
( |
EntityHolder | $propertyHolder = null | ) |
|
Do not use to construct new stuff from outside of this class, use the static newFoobar methods.
In other words: treat as protected (which it was, but now cannot be since we derive from Content).
- Access:\n protected
- Parameters
-
EntityHolder | null | $propertyHolder | |
- Exceptions
-
◆ getEntity()
Wikibase\Repo\Content\PropertyContent::getEntity |
( |
| ) |
|
- See also
- EntityContent::getEntity
- Exceptions
-
LogicException | if the content object is empty and does not contain an entity. |
- Returns
- Property
Reimplemented from Wikibase\Repo\Content\EntityContent.
◆ getEntityHolder()
Wikibase\Repo\Content\PropertyContent::getEntityHolder |
( |
| ) |
|
◆ getEntityPageProperties()
Wikibase\Repo\Content\PropertyContent::getEntityPageProperties |
( |
| ) |
|
- See also
- EntityContent::getEntityPageProperties
Records the number of statements in the 'wb-claims' key.
- Returns
- array A map from property names to property values.
Reimplemented from Wikibase\Repo\Content\EntityContent.
◆ getIgnoreKeysForFilters()
Wikibase\Repo\Content\PropertyContent::getIgnoreKeysForFilters |
( |
| ) |
|
|
protected |
Get the keys within this Contents Entity JSON that should be removed for text passed to edit filters.
- Returns
- string[] Keys to ignore
Reimplemented from Wikibase\Repo\Content\EntityContent.
◆ getProperty()
Wikibase\Repo\Content\PropertyContent::getProperty |
( |
| ) |
|
- Exceptions
-
LogicException | if the content object is empty and does not contain an entity. |
- Returns
- Property
◆ isEmpty()
Wikibase\Repo\Content\PropertyContent::isEmpty |
( |
| ) |
|
◆ isValid()
Wikibase\Repo\Content\PropertyContent::isValid |
( |
| ) |
|
Checks if this PropertyContent is valid for saving.
Returns false if the entity does not have a DataType set.
- See also
- Content::isValid()
- Returns
- bool True if this content object is valid for saving. False if there is no entity, or the entity does not have an ID set.
Reimplemented from Wikibase\Repo\Content\EntityContent.
◆ newFromProperty()
static Wikibase\Repo\Content\PropertyContent::newFromProperty |
( |
Property | $property | ) |
|
|
static |
Create a new propertyContent object for the provided property.
- Parameters
-
- Returns
- self
◆ $propertyHolder
Wikibase\Repo\Content\PropertyContent::$propertyHolder |
|
private |
◆ CONTENT_MODEL_ID
const Wikibase\Repo\Content\PropertyContent::CONTENT_MODEL_ID = 'wikibase-property' |
The documentation for this class was generated from the following file: