Wikibase
MediaWiki Wikibase extension
|
Code to make the PageImages extension aware of pages in the Wikibase namespaces. More...
Public Member Functions | |
__construct (array $imagePropertyIds, $pagePropName) | |
processStatement (Statement $statement) | |
updateParserOutput (ParserOutput $parserOutput) | |
Private Member Functions | |
processSnak (Snak $snak, PropertyId $propertyId, $rank) | |
getString (Snak $snak) | |
isAcceptablePriority ( $propertyId) | |
isSamePriority ( $propertyId) | |
isAcceptableRank ( $rank) | |
isBetterRank ( $rank) | |
Private Attributes | |
$propertyPriorities | |
$pagePropName | |
$bestProperty | |
$bestRank | |
$bestFileName = null | |
Code to make the PageImages extension aware of pages in the Wikibase namespaces.
The algorithm tries to find the one "best" image on an entity page, also referred to as the "lead image".
Wikibase\Repo\ParserOutput\PageImagesDataUpdater::__construct | ( | array | $imagePropertyIds, |
$pagePropName ) |
string[] | $imagePropertyIds | List of image property id strings, in order of preference. |
string | $pagePropName | PageImages page prop name |
|
private |
Snak | $snak |
|
private |
string | $propertyId |
|
private |
int | $rank |
|
private |
int | $rank |
|
private |
string | $propertyId |
|
private |
Snak | $snak | |
PropertyId | $propertyId | |
int | $rank |
Wikibase\Repo\ParserOutput\PageImagesDataUpdater::processStatement | ( | Statement | $statement | ) |
Statement | $statement |
Implements Wikibase\Repo\ParserOutput\StatementDataUpdater.
Wikibase\Repo\ParserOutput\PageImagesDataUpdater::updateParserOutput | ( | ParserOutput | $parserOutput | ) |
ParserOutput | $parserOutput |
Implements Wikibase\Repo\ParserOutput\StatementDataUpdater.
|
private |
|
private |
|
private |
|
private |
|
private |