Resource loader module for defining resources that will create a MW config var in JavaScript holding information about all data types known to a given DataTypeFactory.
More...
|
| __construct (array $resourceDefinition) |
|
| getConfigVarName () |
| Returns the name of the config var key under which the data type definition will be available in JavaScript using "mw.config.get( '...' )".
|
|
| getDataTypeFactory () |
| Returns the data types factory providing the data type information.
|
|
| getScript (RL\Context $context) |
| Used to propagate available data type ids to JavaScript.
|
|
| getDefinitionSummary (RL\Context $context) |
|
Resource loader module for defining resources that will create a MW config var in JavaScript holding information about all data types known to a given DataTypeFactory.
The resource definition requires the following additional keys:
- (string) datatypesconfigvarname: Name of the "mw.config.get( '...' )" config variable.
- (Function|DataTypeFactory) datatypefactory: Provider for the data types. Can be a callback returning a DataTypeFactory instance.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Werner < danie.nosp@m.l.a..nosp@m.r.wer.nosp@m.ner@.nosp@m.gmail.nosp@m..com >
◆ __construct()
Wikibase\Lib\Modules\DataTypesModule::__construct |
( |
array | $resourceDefinition | ) |
|
◆ extractDataTypeFactoryFromResourceDefinition()
static Wikibase\Lib\Modules\DataTypesModule::extractDataTypeFactoryFromResourceDefinition |
( |
array | $resourceDefinition | ) |
|
|
static |
- Since
- 0.1
- Parameters
-
- Returns
- DataTypeFactory
◆ extractDataTypesConfigVarNameFromResourceDefinition()
static Wikibase\Lib\Modules\DataTypesModule::extractDataTypesConfigVarNameFromResourceDefinition |
( |
array | $resourceDefinition | ) |
|
|
static |
- Since
- 0.1
- Parameters
-
- Returns
- string
◆ getConfigVarName()
Wikibase\Lib\Modules\DataTypesModule::getConfigVarName |
( |
| ) |
|
Returns the name of the config var key under which the data type definition will be available in JavaScript using "mw.config.get( '...' )".
- Since
- 0.1
- Returns
- string
◆ getDataTypeFactory()
Wikibase\Lib\Modules\DataTypesModule::getDataTypeFactory |
( |
| ) |
|
Returns the data types factory providing the data type information.
- Since
- 0.1
- Returns
- DataTypeFactory
◆ getDefinitionSummary()
Wikibase\Lib\Modules\DataTypesModule::getDefinitionSummary |
( |
RL\Context | $context | ) |
|
- See also
- RL\Module::getDefinitionSummary
- Parameters
-
- Returns
- array
◆ getScript()
Wikibase\Lib\Modules\DataTypesModule::getScript |
( |
RL\Context | $context | ) |
|
Used to propagate available data type ids to JavaScript.
Data type ids will be available in 'wbDataTypeIds' config var.
- See also
- RL\Module::getScript
- Since
- 0.1
- Parameters
-
- Returns
- string
◆ $dataTypeFactory
Wikibase\Lib\Modules\DataTypesModule::$dataTypeFactory |
|
protected |
◆ $dataTypes
Wikibase\Lib\Modules\DataTypesModule::$dataTypes |
|
protected |
◆ $dataTypesConfigVarName
Wikibase\Lib\Modules\DataTypesModule::$dataTypesConfigVarName |
|
protected |
The documentation for this class was generated from the following file: