Wikibase
MediaWiki Wikibase extension
Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater Class Reference

Update Wikibase ParserOutput properties and extension data. More...

Public Member Functions

 __construct (OtherProjectsSidebarGeneratorFactory $otherProjectsSidebarGeneratorFactory, SiteLinkLookup $siteLinkLookup, EntityLookup $entityLookup, UsageAccumulatorFactory $usageAccumulatorFactory, string $siteId, int $unconnectedPagePagePropMigrationStage, LoggerInterface $logger=null)
 
 updateItemIdProperty (Title $title, ParserOutput $parserOutput)
 Add wikibase_item parser output property. More...
 
 updateTrackingCategories (Title $title, ParserOutput $parserOutput)
 Add tracking category if the page is a redirect and is connected to an item. More...
 
 updateOtherProjectsLinksData (Title $title, ParserOutput $parserOutput)
 
 updateUnconnectedPageProperty (Content $content, Title $title, ParserOutput $parserOutput)
 Writes the "unexpectedUnconnectedPage" page property if this page is not linked to an item and doesn't have the "__EXPECTED_UNCONNECTED_PAGE__" magic word on it. More...
 
 updateBadgesProperty (Title $title, ParserOutput $parserOutput)
 

Private Member Functions

 setUnexpectedUnconnectedPage (Content $content, Title $title, ParserOutput $parserOutput)
 If applicable, set the "unexpectedUnconnectedPage" page property. More...
 
 getItemIdForTitle (Title $title)
 

Private Attributes

 $otherProjectsSidebarGeneratorFactory
 
 $entityLookup
 
 $siteLinkLookup
 
 $usageAccumulatorFactory
 
 $siteId
 
 $unconnectedPagePagePropMigrationStage
 
 $logger
 

Detailed Description

Update Wikibase ParserOutput properties and extension data.

Author
Daniel Kinzler
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::__construct ( OtherProjectsSidebarGeneratorFactory  $otherProjectsSidebarGeneratorFactory,
SiteLinkLookup  $siteLinkLookup,
EntityLookup  $entityLookup,
UsageAccumulatorFactory  $usageAccumulatorFactory,
string  $siteId,
int  $unconnectedPagePagePropMigrationStage,
LoggerInterface  $logger = null 
)
Parameters
OtherProjectsSidebarGeneratorFactory$otherProjectsSidebarGeneratorFactoryUse the factory here to defer initialization of things like Site objects.
SiteLinkLookup$siteLinkLookup
EntityLookup$entityLookup
UsageAccumulatorFactory$usageAccumulatorFactory
string$siteIdThe global site ID for the local wiki
int$unconnectedPagePagePropMigrationStageOne of the MIGRATION_* constants, indicating which page prop(s) to write for unconnected pages.
LoggerInterface | null$logger
Exceptions
InvalidArgumentException

Member Function Documentation

◆ getItemIdForTitle()

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::getItemIdForTitle ( Title  $title)
private

◆ setUnexpectedUnconnectedPage()

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::setUnexpectedUnconnectedPage ( Content  $content,
Title  $title,
ParserOutput  $parserOutput 
)
private

If applicable, set the "unexpectedUnconnectedPage" page property.

◆ updateBadgesProperty()

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::updateBadgesProperty ( Title  $title,
ParserOutput  $parserOutput 
)

◆ updateItemIdProperty()

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::updateItemIdProperty ( Title  $title,
ParserOutput  $parserOutput 
)

Add wikibase_item parser output property.

◆ updateOtherProjectsLinksData()

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::updateOtherProjectsLinksData ( Title  $title,
ParserOutput  $parserOutput 
)

◆ updateTrackingCategories()

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::updateTrackingCategories ( Title  $title,
ParserOutput  $parserOutput 
)

Add tracking category if the page is a redirect and is connected to an item.

◆ updateUnconnectedPageProperty()

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::updateUnconnectedPageProperty ( Content  $content,
Title  $title,
ParserOutput  $parserOutput 
)

Writes the "unexpectedUnconnectedPage" page property if this page is not linked to an item and doesn't have the "__EXPECTED_UNCONNECTED_PAGE__" magic word on it.

Note
Depending on the "tmpUnconnectedPagePagePropMigrationStage" setting, this may not set the "unexpectedUnconnectedPage" page prop.

Member Data Documentation

◆ $entityLookup

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::$entityLookup
private

◆ $logger

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::$logger
private

◆ $otherProjectsSidebarGeneratorFactory

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::$otherProjectsSidebarGeneratorFactory
private

◆ $siteId

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::$siteId
private

◆ $siteLinkLookup

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::$siteLinkLookup
private

◆ $unconnectedPagePagePropMigrationStage

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::$unconnectedPagePagePropMigrationStage
private

◆ $usageAccumulatorFactory

Wikibase\Client\ParserOutput\ClientParserOutputDataUpdater::$usageAccumulatorFactory
private

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