Registers and defines functions to access Wikibase through the Scribunto extension.
More...
|
| getUsageAccumulator () |
|
| addStatementUsage ( $entityId, $propertyId) |
| Add a statement usage (called once specific statements are accessed).
|
|
| addLabelUsage ( $entityId, $langCode) |
| Add a label usage (called once specific labels are accessed).
|
|
| addDescriptionUsage ( $entityId, $langCode) |
| Add a description usage (called once specific descriptions are accessed).
|
|
| addSiteLinksUsage ( $entityId) |
| Add a sitelinks usage (called once specific sitelinks are accessed).
|
|
| addOtherUsage ( $entityId) |
| Add an other (O) usage (called once the otherwise not covered aspect is used).
|
|
| register () |
| Register mw.wikibase.entity.lua library.
|
|
| getSetting ( $setting) |
| Wrapper for getSetting.
|
|
| getGlobalSiteId () |
| Wrapper for getGlobalSiteId in WikibaseLuaEntityBindings.
|
|
| getLanguageCode () |
| Wrapper for getLanguageCode in WikibaseLuaEntityBindings.
|
|
| formatPropertyValues ( $entityId, $propertyLabelOrId, array $acceptableRanks=null) |
| Format the main Snaks belonging to a Statement (which is identified by a PropertyId or the label of a Property) as wikitext escaped plain text.
|
|
| formatStatements ( $entityId, $propertyLabelOrId, array $acceptableRanks=null) |
| Format the main Snaks belonging to a Statement (which is identified by a PropertyId or the label of a Property) as rich wikitext.
|
|
| incrementStatsKey ( $key) |
| Increment the given stats key.
|
|
Registers and defines 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 >
-
Andrew Hall
◆ addDescriptionUsage()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::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 | $langCode | Language code of the descriptions accessed. |
◆ addLabelUsage()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::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 | $langCode | Language code of the labels accessed. |
◆ addOtherUsage()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::addOtherUsage |
( |
|
$entityId | ) |
|
Add an other (O) usage (called once the otherwise not covered aspect is used).
- Parameters
-
string | $entityId | The Entity from which something was accessed. |
◆ addSiteLinksUsage()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::addSiteLinksUsage |
( |
|
$entityId | ) |
|
Add a sitelinks usage (called once specific sitelinks are accessed).
- Parameters
-
string | $entityId | The Entity from which the sitelinks were accessed. |
◆ addStatementUsage()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::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. |
◆ allowDataAccessInUserLanguage()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::allowDataAccessInUserLanguage |
( |
| ) |
|
|
private |
◆ formatPropertyValues()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::formatPropertyValues |
( |
|
$entityId, |
|
|
|
$propertyLabelOrId, |
|
|
array |
$acceptableRanks = null |
|
) |
| |
Format the main Snaks belonging to a Statement (which is identified by a PropertyId or the label of a Property) as wikitext escaped plain text.
- Parameters
-
string | $entityId | |
string | $propertyLabelOrId | |
int[] | null | $acceptableRanks | |
- Exceptions
-
- Returns
- string[]|null[]
◆ formatStatements()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::formatStatements |
( |
|
$entityId, |
|
|
|
$propertyLabelOrId, |
|
|
array |
$acceptableRanks = null |
|
) |
| |
Format the main Snaks belonging to a Statement (which is identified by a PropertyId or the label of a Property) as rich wikitext.
- Parameters
-
string | $entityId | |
string | $propertyLabelOrId | |
int[] | null | $acceptableRanks | |
- Exceptions
-
- Returns
- string[]|null[]
◆ getGlobalSiteId()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::getGlobalSiteId |
( |
| ) |
|
Wrapper for getGlobalSiteId in WikibaseLuaEntityBindings.
- Returns
- string[]
◆ getImplementation()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::getImplementation |
( |
| ) |
|
|
private |
◆ getLanguage()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::getLanguage |
( |
| ) |
|
|
private |
Returns the language to use.
If we are on a multilingual wiki (allowDataAccessInUserLanguage is true) this will be the user's interface language, otherwise it will be the content language. In a perfect world, this would equal Parser::getTargetLanguage.
This can probably be removed after T114640 has been implemented.
Please note, that this splits the parser cache by user language, if allowDataAccessInUserLanguage is true.
- Returns
- Language
◆ getLanguageCode()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::getLanguageCode |
( |
| ) |
|
Wrapper for getLanguageCode in WikibaseLuaEntityBindings.
- Returns
- string[]
◆ getLuaFunctionCallTracker()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::getLuaFunctionCallTracker |
( |
| ) |
|
|
private |
- Returns
- LuaFunctionCallTracker
◆ getSetting()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::getSetting |
( |
|
$setting | ) |
|
Wrapper for getSetting.
- Parameters
-
- Returns
- array
◆ getUsageAccumulator()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::getUsageAccumulator |
( |
| ) |
|
- Returns
- ParserOutputUsageAccumulator
◆ incrementStatsKey()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::incrementStatsKey |
( |
|
$key | ) |
|
Increment the given stats key.
- Parameters
-
◆ newImplementation()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::newImplementation |
( |
| ) |
|
|
private |
◆ newRichWikitextSnakFormatter()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::newRichWikitextSnakFormatter |
( |
DataAccessSnakFormatterFactory |
$snakFormatterFactory, |
|
|
Language |
$lang |
|
) |
| |
|
private |
- Parameters
-
DataAccessSnakFormatterFactory | $snakFormatterFactory | |
Language | $lang | |
- Returns
- WikitextPreprocessingSnakFormatter
◆ register()
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::register |
( |
| ) |
|
Register mw.wikibase.entity.lua library.
- Returns
- array
◆ $luaFunctionCallTracker
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::$luaFunctionCallTracker = null |
|
private |
◆ $wbLibrary
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::$wbLibrary |
|
private |
The documentation for this class was generated from the following file: