Content object for articles representing Wikibase properties.
More...
|
static | newFromProperty (Property $property) |
| Create a new propertyContent object for the provided property.
|
|
◆ __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.
◆ getParserOutputFromEntityView()
Wikibase\Repo\Content\PropertyContent::getParserOutputFromEntityView |
( |
|
$revisionId, |
|
|
ParserOptions |
$options, |
|
|
|
$generateHtml = true |
|
) |
| |
|
protected |
- Note
- Will fail if this EntityContent represents a redirect.
- Parameters
-
int | null | $revisionId | |
ParserOptions | $options | |
bool | $generateHtml | |
- Returns
- ParserOutput
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()
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: