Wikibase
MediaWiki Wikibase extension
|
Content object for articles representing Wikibase properties. More...
Public Member Functions | |
__construct (EntityHolder $propertyHolder=null) | |
Do not use to construct new stuff from outside of this class, use the static newFoobar methods. More... | |
getProperty () | |
getEntity () | |
getEntityHolder () | |
getEntityPageProperties () | |
isValid () | |
Checks if this PropertyContent is valid for saving. More... | |
isEmpty () | |
Public Member Functions inherited from Wikibase\Repo\Content\EntityContent | |
isCountable ( $hasLinks=null) | |
getEntityRedirect () | |
Returns the EntityRedirect represented by this EntityContent, or null if this EntityContent is not a redirect. More... | |
getEntityId () | |
getParserOutput (Title $title, $revisionId=null, ParserOptions $options=null, $generateHtml=true) | |
Returns a ParserOutput object containing the HTML. More... | |
getTextForSearchIndex () | |
getTextForFilters () | |
getWikitextForTransclusion () | |
getTextForSummary ( $maxLength=250) | |
Returns a textual representation of the content suitable for use in edit summaries and log messages. More... | |
getNativeData () | |
getSize () | |
returns the content's nominal size in bogo-bytes. More... | |
equals (Content $that=null) | |
Both contents will be considered equal if they have the same ID and equal Entity data. More... | |
getDiff (EntityContent $toContent) | |
Returns a diff between this EntityContent and the given EntityContent. More... | |
getPatchedCopy (EntityContentDiff $patch) | |
Returns a patched copy of this Content object. More... | |
copy () | |
prepareSave (WikiPage $page, $flags, $baseRevId, User $user) | |
Static Public Member Functions | |
static | newFromProperty (Property $property) |
Create a new propertyContent object for the provided property. More... | |
Public Attributes | |
const | CONTENT_MODEL_ID = 'wikibase-property' |
Public Attributes inherited from Wikibase\Repo\Content\EntityContent | |
const | EDIT_IGNORE_CONSTRAINTS = 1024 |
Flag for use with prepareSave(), indicating that no pre-save validation should be applied. More... | |
Protected Member Functions | |
getIgnoreKeysForFilters () | |
Get the keys within this Contents Entity JSON that should be removed for text passed to edit filters. More... | |
getParserOutputFromEntityView ( $revisionId, ParserOptions $options, $generateHtml=true) | |
Protected Member Functions inherited from Wikibase\Repo\Content\EntityContent | |
getParserOutputForRedirect ( $generateHtml) | |
getRedirectText () | |
Private Attributes | |
$propertyHolder | |
Content object for articles representing Wikibase properties.
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).
EntityHolder | null | $propertyHolder |
InvalidArgumentException |
Wikibase\Repo\Content\PropertyContent::getEntity | ( | ) |
LogicException | if the content object is empty and does not contain an entity. |
Reimplemented from Wikibase\Repo\Content\EntityContent.
Wikibase\Repo\Content\PropertyContent::getEntityHolder | ( | ) |
Reimplemented from Wikibase\Repo\Content\EntityContent.
Wikibase\Repo\Content\PropertyContent::getEntityPageProperties | ( | ) |
Records the number of statements in the 'wb-claims' key.
Reimplemented from Wikibase\Repo\Content\EntityContent.
|
protected |
Get the keys within this Contents Entity JSON that should be removed for text passed to edit filters.
Reimplemented from Wikibase\Repo\Content\EntityContent.
|
protected |
int | null | $revisionId | |
ParserOptions | $options | |
bool | $generateHtml |
Reimplemented from Wikibase\Repo\Content\EntityContent.
Wikibase\Repo\Content\PropertyContent::getProperty | ( | ) |
LogicException | if the content object is empty and does not contain an entity. |
Wikibase\Repo\Content\PropertyContent::isEmpty | ( | ) |
Reimplemented from Wikibase\Repo\Content\EntityContent.
Wikibase\Repo\Content\PropertyContent::isValid | ( | ) |
Checks if this PropertyContent is valid for saving.
Returns false if the entity does not have a DataType set.
Reimplemented from Wikibase\Repo\Content\EntityContent.
|
static |
Create a new propertyContent object for the provided property.
Property | $property |
|
private |
const Wikibase\Repo\Content\PropertyContent::CONTENT_MODEL_ID = 'wikibase-property' |