Merge "ve.dm.MWTemplateSpecModel: Implement getParameterOrigin"

This commit is contained in:
jenkins-bot 2013-06-28 22:47:26 +00:00 committed by Gerrit Code Review
commit 6e447ce45c

View file

@ -126,6 +126,7 @@ ve.dm.MWTemplateSpecModel.prototype.getDefaultParameterSpec = function ( name )
'default': '',
'type': 'string',
'aliases': [],
'origin': name,
'required': false,
'deprecated': false
};
@ -224,6 +225,19 @@ ve.dm.MWTemplateSpecModel.prototype.getParameterAliases = function ( name ) {
return this.params[name].aliases;
};
/**
* Get the parameter origin, which is the parameter this is an alias of.
*
* If a parameter is not an alias of another, its origin and name will be the same.
*
* @method
* @param {string} name Parameter name
* @returns {string} Origin parameter name
*/
ve.dm.MWTemplateSpecModel.prototype.getParameterOrigin = function ( name ) {
return this.params[name].origin;
};
/**
* Check if parameter is required.
*