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

Content handler for Wikibase items. More...

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

Public Member Functions

 __construct (array $entityTermStoreWriters, EntityContentDataCodec $contentCodec, EntityConstraintProvider $constraintProvider, ValidatorErrorLocalizer $errorLocalizer, EntityIdParser $entityIdParser, SiteLinkStore $siteLinkStore, EntityIdLookup $entityIdLookup, LanguageFallbackLabelDescriptionLookupFactory $labelLookupFactory, FieldDefinitions $itemFieldDefinitions, PropertyDataTypeLookup $dataTypeLookup, $legacyExportFormatDetector=null)
 
 getActionOverrides ()
 
 getSpecialPageForCreation ()
 
 getEntityType ()
 Returns Item::ENTITY_TYPE. More...
 
 getDeletionUpdates (Title $title, $role)
 
 makeEmptyEntity ()
 
 makeEntityRedirectContent (EntityRedirect $redirect)
 
 supportsRedirects ()
 
 makeEntityId ( $id)
 
 getIdentifiersCount (StatementList $statementList)
 
- 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 ()
 
 supportsCategories ()
 None of the Entity content models support categories. 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 ( $latest, $newer, $older, $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)
 

Protected Member Functions

 newEntityContent (EntityHolder $entityHolder=null)
 
- Protected Member Functions inherited from Wikibase\Repo\Content\EntityHandler
 getDiffEngineClass ()
 

Private Attributes

 $siteLinkStore
 
 $entityIdLookup
 
 $labelLookupFactory
 
 $dataTypeLookup
 
 $entityTermStoreWriters
 

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
Adrian Heine adria.nosp@m.n.he.nosp@m.ine@w.nosp@m.ikim.nosp@m.edia..nosp@m.de

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Content\ItemHandler::__construct ( array  $entityTermStoreWriters,
EntityContentDataCodec  $contentCodec,
EntityConstraintProvider  $constraintProvider,
ValidatorErrorLocalizer  $errorLocalizer,
EntityIdParser  $entityIdParser,
SiteLinkStore  $siteLinkStore,
EntityIdLookup  $entityIdLookup,
LanguageFallbackLabelDescriptionLookupFactory  $labelLookupFactory,
FieldDefinitions  $itemFieldDefinitions,
PropertyDataTypeLookup  $dataTypeLookup,
  $legacyExportFormatDetector = null 
)
Parameters
EntityTermStoreWriter[]$entityTermStoreWriters
EntityContentDataCodec$contentCodec
EntityConstraintProvider$constraintProvider
ValidatorErrorLocalizer$errorLocalizer
EntityIdParser$entityIdParser
SiteLinkStore$siteLinkStore
EntityIdLookup$entityIdLookup
LanguageFallbackLabelDescriptionLookupFactory$labelLookupFactory
FieldDefinitions$itemFieldDefinitions
PropertyDataTypeLookup$dataTypeLookup
callable | null$legacyExportFormatDetector

Member Function Documentation

◆ getActionOverrides()

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

◆ getDeletionUpdates()

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

◆ getEntityType()

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

Returns Item::ENTITY_TYPE.

Returns
string

Reimplemented from Wikibase\Repo\Content\EntityHandler.

◆ getIdentifiersCount()

Wikibase\Repo\Content\ItemHandler::getIdentifiersCount ( StatementList  $statementList)
Parameters
StatementList$statementList
Returns
int

◆ getSpecialPageForCreation()

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

◆ makeEmptyEntity()

Wikibase\Repo\Content\ItemHandler::makeEmptyEntity ( )
See also
EntityHandler::makeEmptyEntity()
Returns
EntityDocument

Reimplemented from Wikibase\Repo\Content\EntityHandler.

◆ makeEntityId()

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

Reimplemented from Wikibase\Repo\Content\EntityHandler.

◆ makeEntityRedirectContent()

Wikibase\Repo\Content\ItemHandler::makeEntityRedirectContent ( EntityRedirect  $redirect)
See also
EntityHandler::makeEntityRedirectContent
Parameters
EntityRedirect$redirect
Returns
ItemContent

Reimplemented from Wikibase\Repo\Content\EntityHandler.

◆ newEntityContent()

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

Reimplemented from Wikibase\Repo\Content\EntityHandler.

◆ supportsRedirects()

Wikibase\Repo\Content\ItemHandler::supportsRedirects ( )
See also
EntityHandler::supportsRedirects
Returns
bool Always true.

Member Data Documentation

◆ $dataTypeLookup

Wikibase\Repo\Content\ItemHandler::$dataTypeLookup
private

◆ $entityIdLookup

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

◆ $entityTermStoreWriters

Wikibase\Repo\Content\ItemHandler::$entityTermStoreWriters
private

◆ $labelLookupFactory

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

◆ $siteLinkStore

Wikibase\Repo\Content\ItemHandler::$siteLinkStore
private

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