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. More... | |
getPagesUsing (array $entityIds, array $aspects=[]) | |
Returns the pages that use any of the given entities. More... | |
getUnusedEntities (array $entityIds) | |
Returns the elements of $entityIds that are currently not used as far as this UsageTracker knows. More... | |
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\Sql\SqlUsageTracker, and Wikibase\Client\Usage\NullUsageTracker.
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\Sql\SqlUsageTracker, Wikibase\Client\Usage\NullUsageTracker, and Wikibase\Client\Usage\ImplicitDescriptionUsageLookup.
Wikibase\Client\Usage\UsageLookup::getUsagesForPage | ( | $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\Sql\SqlUsageTracker, Wikibase\Client\Usage\NullUsageTracker, and Wikibase\Client\Usage\ImplicitDescriptionUsageLookup.