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, $moduleName, $allowLocalShortDesc, DescriptionLookup $descriptionLookup)
 
 execute ()
 
 getCacheMode ( $params)
 
 isInternal ()
 

Static Public Member Functions

static newFromGlobalState (ApiQuery $apiQuery, string $moduleName)
 

Protected Member Functions

 getAllowedParams ()
 
 getExamplesMessages ()
 

Private Member Functions

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

Private Attributes

 $allowLocalShortDesc
 
 $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,
  $moduleName,
  $allowLocalShortDesc,
DescriptionLookup  $descriptionLookup 
)
Parameters
ApiQuery$query
string$moduleName
bool$allowLocalShortDescWhether the wiki allows local descriptions.
DescriptionLookup$descriptionLookup

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 ( )

◆ newFromGlobalState()

static Wikibase\Client\Api\Description::newFromGlobalState ( ApiQuery  $apiQuery,
string  $moduleName 
)
static

Member Data Documentation

◆ $allowLocalShortDesc

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

◆ $descriptionLookup

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

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