Actual implementations of the functions to access Wikibase through the Scribunto extension.
More...
|
| __construct (StatementTransclusionInteractor $plainTextTransclusionInteractor, StatementTransclusionInteractor $richWikitextTransclusionInteractor, EntityIdParser $entityIdParser, ContentLanguages $termsLanguages, Language $language, UsageAccumulator $usageAccumulator, $siteId) |
|
| formatPropertyValues ( $entityId, $propertyLabelOrId, array $acceptableRanks=null) |
| Format the main Snaks belonging to a Statement (which is identified by a NumericPropertyId or the label of a Property) as wikitext escaped plain text. More...
|
|
| formatStatements ( $entityId, $propertyLabelOrId, array $acceptableRanks=null) |
| Format the main Snaks belonging to a Statement (which is identified by a NumericPropertyId or the label of a Property) as rich wikitext. More...
|
|
| addStatementUsage ( $entityId, $propertyId) |
| Add a statement usage (called once specific statements are accessed). More...
|
|
| addLabelUsage ( $entityId, $langCode) |
| Add a label usage (called once specific labels are accessed). More...
|
|
| addDescriptionUsage ( $entityId, $langCode) |
| Add a description usage (called once specific descriptions are accessed). More...
|
|
| addOtherUsage ( $entityId) |
| Add a other usage. More...
|
|
| addSiteLinksUsage ( $entityId) |
| Add a sitelink usage (called once any sitelink is accessed). More...
|
|
| getGlobalSiteId () |
| Get global site ID (e.g. More...
|
|
| getLanguageCode () |
| Get the language we are currently working with. More...
|
|
Actual implementations of the functions to access Wikibase through the Scribunto extension.
- Copyright
- GPL-2.0-or-later
- Author
- Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >
◆ __construct()
◆ addDescriptionUsage()
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::addDescriptionUsage |
( |
|
$entityId, |
|
|
|
$langCode |
|
) |
| |
Add a description usage (called once specific descriptions are accessed).
- Parameters
-
string | $entityId | The Entity from which the descriptions were accessed. |
string | null | $langCode | Language code the descriptions accessed. |
◆ addLabelUsage()
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::addLabelUsage |
( |
|
$entityId, |
|
|
|
$langCode |
|
) |
| |
Add a label usage (called once specific labels are accessed).
- Parameters
-
string | $entityId | The Entity from which the labels were accessed. |
string | null | $langCode | Language code the labels accessed. |
◆ addOtherUsage()
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::addOtherUsage |
( |
|
$entityId | ) |
|
Add a other usage.
- Parameters
-
string | $entityId | The Entity from which something was accessed. |
◆ addSiteLinksUsage()
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::addSiteLinksUsage |
( |
|
$entityId | ) |
|
Add a sitelink usage (called once any sitelink is accessed).
- Parameters
-
string | $entityId | The Entity from which the sitelinks were accessed. |
◆ addStatementUsage()
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::addStatementUsage |
( |
|
$entityId, |
|
|
|
$propertyId |
|
) |
| |
Add a statement usage (called once specific statements are accessed).
- Parameters
-
string | $entityId | The Entity from which the statements were accessed. |
string | $propertyId | Property id of the statements accessed. |
◆ formatPropertyValues()
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::formatPropertyValues |
( |
|
$entityId, |
|
|
|
$propertyLabelOrId, |
|
|
array |
$acceptableRanks = null |
|
) |
| |
Format the main Snaks belonging to a Statement (which is identified by a NumericPropertyId or the label of a Property) as wikitext escaped plain text.
- Parameters
-
string | $entityId | |
string | $propertyLabelOrId | |
int[] | null | $acceptableRanks | |
- Returns
- string Wikitext
◆ formatStatements()
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::formatStatements |
( |
|
$entityId, |
|
|
|
$propertyLabelOrId, |
|
|
array |
$acceptableRanks = null |
|
) |
| |
Format the main Snaks belonging to a Statement (which is identified by a NumericPropertyId or the label of a Property) as rich wikitext.
- Parameters
-
string | $entityId | |
string | $propertyLabelOrId | |
int[] | null | $acceptableRanks | |
- Returns
- string Wikitext
◆ getGlobalSiteId()
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::getGlobalSiteId |
( |
| ) |
|
Get global site ID (e.g.
"enwiki") This is basically a helper function.
- Todo:
- Make this part of mw.site in the Scribunto extension.
- Returns
- string
◆ getLanguageCode()
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::getLanguageCode |
( |
| ) |
|
Get the language we are currently working with.
- Todo:
- Once T114640 has been implemented, this should probably be generally exposed in Scribunto as parser target language.
- Returns
- string
◆ $entityIdParser
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::$entityIdParser |
|
private |
◆ $language
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::$language |
|
private |
◆ $plainTextTransclusionInteractor
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::$plainTextTransclusionInteractor |
|
private |
◆ $richWikitextTransclusionInteractor
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::$richWikitextTransclusionInteractor |
|
private |
◆ $siteId
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::$siteId |
|
private |
◆ $termsLanguages
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::$termsLanguages |
|
private |
◆ $usageAccumulator
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::$usageAccumulator |
|
private |
The documentation for this class was generated from the following file: