mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 08:10:35 +00:00
Methods for new "maps" property in TD Root
Methods for new "maps" property in Template Data JSON root added to the Template Specification Model * Added maps property to MWTemplateSpecModel * Maps filled in extend function * Added getter function for maps Depends on I3bf5e002 Change-Id: Ic555093625358d8fc4cb1ca8c68793b5912e8ced
This commit is contained in:
parent
fbc7ecbb8d
commit
2ac7959849
|
@ -23,6 +23,7 @@ ve.dm.MWTemplateSpecModel = function VeDmMWTemplateSpecModel( template ) {
|
|||
this.params = {};
|
||||
this.paramOrder = [];
|
||||
this.sets = [];
|
||||
this.maps = {};
|
||||
|
||||
// Initialization
|
||||
this.fill();
|
||||
|
@ -70,6 +71,7 @@ ve.dm.MWTemplateSpecModel.prototype.extend = function ( data ) {
|
|||
}
|
||||
}
|
||||
this.sets = data.sets;
|
||||
this.maps = data.maps;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -317,3 +319,12 @@ ve.dm.MWTemplateSpecModel.prototype.getParameterNames = function () {
|
|||
ve.dm.MWTemplateSpecModel.prototype.getParameterSets = function () {
|
||||
return this.sets;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get map describing relationship between another content type and the parameters.
|
||||
*
|
||||
* @return {Object} Object with application property maps to parameters keyed to application name.
|
||||
*/
|
||||
ve.dm.MWTemplateSpecModel.prototype.getMaps = function () {
|
||||
return this.maps;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue