Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\Api\Description Class Reference

Provides a short description of the page in the content language. More...

+ Inheritance diagram for Wikibase\Client\Api\Description:
+ Collaboration diagram for Wikibase\Client\Api\Description:

Public Member Functions

 __construct (ApiQuery $query, string $moduleName, DescriptionLookup $descriptionLookup, SettingsArray $clientSettings)
 
 execute ()
 
 getCacheMode ( $params)
 
 isInternal ()
 

Protected Member Functions

 getAllowedParams ()
 
 getExamplesMessages ()
 

Private Member Functions

 addDataToResponse (array $pageIds, array $descriptionsByPageId, array $sourcesByPageId, $continue)
 

Private Attributes

 $allowLocalShortDesc
 
 $forceLocalShortDesc
 
 $descriptionLookup
 

Detailed Description

Provides a short description of the page in the content language.

The description may be taken from an upstream Wikibase instance, or from a parser function in the article wikitext.

Arguably this should be a separate extension so that it can be used on wikis without Wikibase as well, but was initially implemented inside Wikibase for speed and convenience (T189154).

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\Api\Description::__construct ( ApiQuery $query,
string $moduleName,
DescriptionLookup $descriptionLookup,
SettingsArray $clientSettings )
Parameters
ApiQuery$query
string$moduleName
DescriptionLookup$descriptionLookup
SettingsArray$clientSettings

Member Function Documentation

◆ addDataToResponse()

Wikibase\Client\Api\Description::addDataToResponse ( array $pageIds,
array $descriptionsByPageId,
array $sourcesByPageId,
$continue )
private
Parameters
int[]$pageIdsPage IDs, in the same order as returned by the ApiPageSet.
string[]$descriptionsByPageIdDescriptions as an associative array of page ID => description in the content language.
string[]$sourcesByPageIdIdentifies where each source came from; an associative array of page ID => DescriptionLookup::SOURCE_*.
int$continueThe API request is being continued from this position.

◆ execute()

Wikibase\Client\Api\Description::execute ( )

◆ getAllowedParams()

Wikibase\Client\Api\Description::getAllowedParams ( )
protected

◆ getCacheMode()

Wikibase\Client\Api\Description::getCacheMode ( $params)

◆ getExamplesMessages()

Wikibase\Client\Api\Description::getExamplesMessages ( )
protected

◆ isInternal()

Wikibase\Client\Api\Description::isInternal ( )

Member Data Documentation

◆ $allowLocalShortDesc

Wikibase\Client\Api\Description::$allowLocalShortDesc
private

◆ $descriptionLookup

Wikibase\Client\Api\Description::$descriptionLookup
private

◆ $forceLocalShortDesc

Wikibase\Client\Api\Description::$forceLocalShortDesc
private

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