Wikibase
MediaWiki Wikibase extension
|
Service interface looking up the usage of entities across pages on the local wiki. More...
Public Member Functions | |
getUsagesForPage (int $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. |
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 |
Implemented in Wikibase\Client\Usage\ImplicitDescriptionUsageLookup, Wikibase\Client\Usage\NullUsageTracker, and Wikibase\Client\Usage\Sql\SqlUsageTracker.
Wikibase\Client\Usage\UsageLookup::getUsagesForPage | ( | int | $pageId | ) |
Get the entities used on the given page.
The returned array uses the identity string
as the key, so that a specific usage can be found quickly.
int | $pageId |
Implemented in Wikibase\Client\Usage\ImplicitDescriptionUsageLookup, Wikibase\Client\Usage\NullUsageTracker, and Wikibase\Client\Usage\Sql\SqlUsageTracker.