Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Content\PropertyHandler Class Reference

Content handler for Wikibase items. More...

+ Inheritance diagram for Wikibase\Repo\Content\PropertyHandler:
+ Collaboration diagram for Wikibase\Repo\Content\PropertyHandler:

Public Member Functions

 __construct (EntityTermStoreWriter $entityTermStoreWriter, EntityContentDataCodec $contentCodec, EntityConstraintProvider $constraintProvider, ValidatorErrorLocalizer $errorLocalizer, EntityIdParser $entityIdParser, EntityIdLookup $entityIdLookup, LanguageFallbackLabelDescriptionLookupFactory $labelLookupFactory, PropertyInfoStore $infoStore, PropertyInfoBuilder $propertyInfoBuilder, FieldDefinitions $propertyFieldDefinitions, $legacyExportFormatDetector=null)
 
 getActionOverrides ()
 
 getSpecialPageForCreation ()
 
 getEntityType ()
 Returns Property::ENTITY_TYPE. More...
 
 getDeletionUpdates (Title $title, $role)
 
 makeEmptyEntity ()
 
 makeEntityId ( $id)
 
- Public Member Functions inherited from Wikibase\Repo\Content\EntityHandler
 __construct ( $modelId, $unused, EntityContentDataCodec $contentCodec, EntityConstraintProvider $constraintProvider, ValidatorErrorLocalizer $errorLocalizer, EntityIdParser $entityIdParser, FieldDefinitions $fieldDefinitions, $legacyExportFormatDetector=null)
 
 getLegacyExportFormatDetector ()
 Returns the callback used to determine whether a serialized blob needs to be re-serialized on export (or null of re-serialization is disabled). More...
 
 showMissingEntity (Title $title, IContextSource $context)
 Handle the fact that a given page does not contain an Entity, even though it could. More...
 
 getOnSaveValidators ( $forCreation, EntityId $entityId)
 Get EntityValidators for on-save validation. More...
 
 getValidationErrorLocalizer ()
 Error localizer for use together with getOnSaveValidators(). More...
 
 makeEmptyContent ()
 
 makeEntityRedirectContent (EntityRedirect $redirect)
 
 supportsCategories ()
 None of the Entity content models support categories. More...
 
 generateHTMLOnEdit ()
 Do not render HTML on edit (T285987) More...
 
 getAutosummary (Content $oldContent=null, Content $newContent=null, $flags=0)
 
 makeRedirectContent (Title $title, $text='')
 
 exportTransform ( $blob, $format=null)
 
 makeEntityContent (EntityHolder $entityHolder)
 
 getDefaultFormat ()
 
 serializeContent (Content $content, $format=null)
 
 unserializeContent ( $blob, $format=null)
 
 getIdForTitle (Title $target)
 Returns the ID of the entity contained by the page of the given title. More...
 
 getTitleForId (EntityId $id)
 Returns the appropriate page Title for the given EntityId. More...
 
 getTitlesForIds (array $ids)
 Returns the appropriate page Titles for the given EntityIds. More...
 
 getEntityNamespace ()
 Returns the namespace that is to be used for this kind of entities. More...
 
 getEntitySlotRole ()
 Returns the slot that is to be used for this kind of entities. More...
 
 canBeUsedOn (Title $title)
 
 isParserCacheSupported ()
 Returns true to indicate that the parser cache can be used for data items. More...
 
 getPageViewLanguage (Title $title, Content $content=null)
 
 getPageLanguage (Title $title, Content $content=null)
 
 getUndoContent (Content $latestContent, Content $newerContent, Content $olderContent, $undoIsLatest=false)
 
 allowAutomaticIds ()
 Whether IDs can automatically be assigned to entities of the kind supported by this EntityHandler. More...
 
 canCreateWithCustomId (EntityId $id)
 Whether the given custom ID is valid for creating a new entity of the kind supported by this EntityHandler. More...
 
 getFieldsForSearchIndex (SearchEngine $engine)
 
 getDataForSearchIndex (WikiPage $page, ParserOutput $output, SearchEngine $engine)
 
 getParserOutputForIndexing (WikiPage $page, ParserCache $cache=null)
 Produce page output suitable for indexing. More...
 
 validateSave (Content $content, ValidationParams $validationParams)
 

Protected Member Functions

 newEntityContent (EntityHolder $entityHolder=null)
 
 getParserOutputFromEntityView (EntityContent $content, $revisionId, ParserOptions $options, $generateHtml=true)
 
Note
Will fail if this EntityContent represents a redirect.
Parameters
EntityContent$content
int | null$revisionId
ParserOptions$options
bool$generateHtml
Returns
ParserOutput
More...
 
- Protected Member Functions inherited from Wikibase\Repo\Content\EntityHandler
 getDiffEngineClass ()
 
 fillParserOutput (Content $content, ContentParseParams $cpoParams, ParserOutput &$output)
 
 getParserOutputForRedirect (EntityContent $content, bool $generateHtml)
 

Private Attributes

 $infoStore
 
 $propertyInfoBuilder
 
 $entityIdLookup
 
 $labelLookupFactory
 
 $entityTermStoreWriter
 

Additional Inherited Members

- Public Attributes inherited from Wikibase\Repo\Content\EntityHandler
const PARSER_VERSION = 3
 Added to parser options for EntityContent. More...
 
- Protected Attributes inherited from Wikibase\Repo\Content\EntityHandler
 $fieldDefinitions
 
 $contentCodec
 
 $constraintProvider
 

Detailed Description

Content handler for Wikibase items.

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Content\PropertyHandler::__construct ( EntityTermStoreWriter  $entityTermStoreWriter,
EntityContentDataCodec  $contentCodec,
EntityConstraintProvider  $constraintProvider,
ValidatorErrorLocalizer  $errorLocalizer,
EntityIdParser  $entityIdParser,
EntityIdLookup  $entityIdLookup,
LanguageFallbackLabelDescriptionLookupFactory  $labelLookupFactory,
PropertyInfoStore  $infoStore,
PropertyInfoBuilder  $propertyInfoBuilder,
FieldDefinitions  $propertyFieldDefinitions,
  $legacyExportFormatDetector = null 
)
Parameters
EntityTermStoreWriter$entityTermStoreWriter
EntityContentDataCodec$contentCodec
EntityConstraintProvider$constraintProvider
ValidatorErrorLocalizer$errorLocalizer
EntityIdParser$entityIdParser
EntityIdLookup$entityIdLookup
LanguageFallbackLabelDescriptionLookupFactory$labelLookupFactory
PropertyInfoStore$infoStore
PropertyInfoBuilder$propertyInfoBuilder
FieldDefinitions$propertyFieldDefinitions
callable | null$legacyExportFormatDetector

Member Function Documentation

◆ getActionOverrides()

Wikibase\Repo\Content\PropertyHandler::getActionOverrides ( )
Returns
(\Closure|class-string)[]

◆ getDeletionUpdates()

Wikibase\Repo\Content\PropertyHandler::getDeletionUpdates ( Title  $title,
  $role 
)

◆ getEntityType()

Wikibase\Repo\Content\PropertyHandler::getEntityType ( )

Returns Property::ENTITY_TYPE.

Returns
string

Reimplemented from Wikibase\Repo\Content\EntityHandler.

◆ getParserOutputFromEntityView()

Wikibase\Repo\Content\PropertyHandler::getParserOutputFromEntityView ( EntityContent  $content,
  $revisionId,
ParserOptions  $options,
  $generateHtml = true 
)
protected

Note
Will fail if this EntityContent represents a redirect.
Parameters
EntityContent$content
int | null$revisionId
ParserOptions$options
bool$generateHtml
Returns
ParserOutput

Reimplemented from Wikibase\Repo\Content\EntityHandler.

◆ getSpecialPageForCreation()

Wikibase\Repo\Content\PropertyHandler::getSpecialPageForCreation ( )

◆ makeEmptyEntity()

Wikibase\Repo\Content\PropertyHandler::makeEmptyEntity ( )
See also
EntityHandler::makeEmptyEntity()
Returns
Property

Reimplemented from Wikibase\Repo\Content\EntityHandler.

◆ makeEntityId()

Wikibase\Repo\Content\PropertyHandler::makeEntityId (   $id)
See also
EntityContent::makeEntityId
Parameters
string$id
Returns
EntityId

Reimplemented from Wikibase\Repo\Content\EntityHandler.

◆ newEntityContent()

Wikibase\Repo\Content\PropertyHandler::newEntityContent ( EntityHolder  $entityHolder = null)
protected
See also
EntityHandler::newEntityContent
Parameters
EntityHolder | null$entityHolder
Returns
PropertyContent

Reimplemented from Wikibase\Repo\Content\EntityHandler.

Member Data Documentation

◆ $entityIdLookup

Wikibase\Repo\Content\PropertyHandler::$entityIdLookup
private

◆ $entityTermStoreWriter

Wikibase\Repo\Content\PropertyHandler::$entityTermStoreWriter
private

◆ $infoStore

Wikibase\Repo\Content\PropertyHandler::$infoStore
private

◆ $labelLookupFactory

Wikibase\Repo\Content\PropertyHandler::$labelLookupFactory
private

◆ $propertyInfoBuilder

Wikibase\Repo\Content\PropertyHandler::$propertyInfoBuilder
private

The documentation for this class was generated from the following file: