Wikibase
MediaWiki Wikibase extension
|
Service interface looking up the usage of entities across pages on the local wiki. More...
Public Member Functions | |
getUsagesForPage ( $pageId) | |
Get the entities used on the given page. | |
getPagesUsing (array $entityIds, array $aspects=[]) | |
Returns the pages that use any of the given entities. | |
getUnusedEntities (array $entityIds) | |
Returns the elements of $entityIds that are currently not used as far as this UsageTracker knows. | |
Service interface looking up the usage of entities across pages on the local wiki.
Wikibase\Client\Usage\UsageLookup::getPagesUsing | ( | array | $entityIds, |
array | $aspects = [] |
||
) |
Returns the pages that use any of the given entities.
EntityId[] | $entityIds | |
string[] | $aspects | Which aspects to consider (if omitted, all aspects are considered). Use the EntityUsage::XXX_USAGE constants to represent aspects. |
UsageTrackerException |
Implemented in Wikibase\Client\Usage\NullUsageTracker, and Wikibase\Client\Usage\Sql\SqlUsageTracker.
Wikibase\Client\Usage\UsageLookup::getUnusedEntities | ( | array | $entityIds | ) |
Returns the elements of $entityIds that are currently not used as far as this UsageTracker knows.
In other words, this method answers the question which of a given list of entities are currently being used on wiki pages.
EntityId[] | $entityIds |
UsageTrackerException |
Implemented in Wikibase\Client\Usage\NullUsageTracker, and Wikibase\Client\Usage\Sql\SqlUsageTracker.
Wikibase\Client\Usage\UsageLookup::getUsagesForPage | ( | $pageId | ) |
Get the entities used on the given page.
int | $pageId |
UsageTrackerException |
Implemented in Wikibase\Client\Usage\NullUsageTracker, and Wikibase\Client\Usage\Sql\SqlUsageTracker.