function requireFor(oElement) {
				var mAlias2URN = {},
					oAttribute = oElement.getAttributeNodeNS(sNAMESPACE, "require"),
					sModuleNames,
					aURNs;

				function asyncRequire() {
					return new SyncPromise(function (resolve, reject) {
						var aModules = aURNs.map(sap.ui.require);

						if (aModules.every(Boolean)) {
							// if all modules have been loaded already, resolve sync
							// Note: we do not care about edge cases where a module value is falsy
							resolve(aModules);
						} else {
							sap.ui.require(aURNs, function (/*oModule,...*/) {
								resolve(arguments); // Note: not exactly an Array, but good enough
							}, reject);
						}
					}).then(function (aModules) {
						Object.keys(mAlias2URN).forEach(function (sAlias, i) {
							oScope[sAlias] = aModules[i];
						});
					});
				}

				if (oAttribute && oAttribute.value) {
					sModuleNames = oAttribute.value;
					// Note: remove the attribute because it might look like a binding and must not
					// reach visitAttributes
					oElement.removeAttributeNode(oAttribute);

					if (sModuleNames[0] === "{") {
						mAlias2URN = JSTokenizer.parseJS(sModuleNames);
						aURNs = Object.keys(mAlias2URN).map(function (sAlias) {
							return mAlias2URN[sAlias];
						});
						return asyncRequire();
					}
					// map dot-separated module names to slash-separated Unified Resource Names
					aURNs = sModuleNames.split(" ").map(function (sModuleName) {
						return sModuleName.replace(/\./g, "/");
					});
					if (!oViewInfo.sync) {
						return asyncRequire();
					}
					aURNs.forEach(sap.ui.requireSync);
				}
				return oSyncPromiseResolved;
			}
/**
			 * Load required modules for the given element (a)synchronously, according to its
			 * "template:require" attribute which may contain either a space separated list of
			 * dot-separated module names or a JSON representation of a map from alias to
			 * slash-separated Unified Resource Names (URNs). In the first case, the resulting
			 * modules must be accessed from the global namespace. In the second case, they are
			 * available as local names (AMD style) similar to <template:alias> instructions.
			 *
			 * @param {Element} oElement
			 *   any XML DOM element
			 * @returns {sap.ui.base.SyncPromise}
			 *   A sync promise which resolves with <code>undefined</code> as soon as all required
			 *   modules have been loaded, or is rejected with a corresponding error if module
			 *   loading fails.
			 * @throws {Error}
			 *   If loading fails in sync mode
			 */
Load required modules for the given element (a)synchronously, according to its
"template:require" attribute which may contain either a space separated list of
dot-separated module names or a JSON representation of a map from alias to
slash-separated Unified Resource Names (URNs). In the first case, the resulting
modules must be accessed from the global namespace. In the second case, they are
available as local names (AMD style) similar to  instructions.

@param {Element} oElement
any XML DOM element
@returns {sap.ui.base.SyncPromise}
A sync promise which resolves with undefined as soon as all required
modules have been loaded, or is rejected with a corresponding error if module
loading fails.
@throws {Error}
If loading fails in sync mode
Load required modules for the given element ( a ) synchronously according to its " template : require " attribute which may contain either a space separated list of dot - separated module names or a JSON representation of a map from alias to slash - separated Unified Resource Names ( URNs ) . In the first case the resulting modules must be accessed from the global namespace . In the second case they are available as local names ( AMD style ) similar to instructions . @param { Element } oElement any XML DOM element @returns { sap . ui . base . SyncPromise } A sync promise which resolves with undefined as soon as all required modules have been loaded or is rejected with a corresponding error if module loading fails . @throws { Error } If loading fails in sync mode
function requireFor(oElement) {
				var mAlias2URN = {},
					oAttribute = oElement.getAttributeNodeNS(sNAMESPACE, "require"),
					sModuleNames,
					aURNs;
				function asyncRequire() {
					return new SyncPromise(function (resolve, reject) {
						var aModules = aURNs.map(sap.ui.require);
						if (aModules.every(Boolean)) {
							resolve(aModules);
						} else {
							sap.ui.require(aURNs, function () {
								resolve(arguments); 
							}, reject);
						}
					}).then(function (aModules) {
						Object.keys(mAlias2URN).forEach(function (sAlias, i) {
							oScope[sAlias] = aModules[i];
						});
					});
				}
				if (oAttribute && oAttribute.value) {
					sModuleNames = oAttribute.value;
					oElement.removeAttributeNode(oAttribute);
					if (sModuleNames[0] === "{") {
						mAlias2URN = JSTokenizer.parseJS(sModuleNames);
						aURNs = Object.keys(mAlias2URN).map(function (sAlias) {
							return mAlias2URN[sAlias];
						});
						return asyncRequire();
					}
					aURNs = sModuleNames.split(" ").map(function (sModuleName) {
						return sModuleName.replace(/\./g, "/");
					});
					if (!oViewInfo.sync) {
						return asyncRequire();
					}
					aURNs.forEach(sap.ui.requireSync);
				}
				return oSyncPromiseResolved;
			}
function requireFor ( oElement ) { var mAlias2URN = { } , oAttribute = oElement . getAttributeNodeNS ( sNAMESPACE , "require" ) , sModuleNames , aURNs ; function asyncRequire ( ) { return new SyncPromise ( function ( resolve , reject ) { var aModules = aURNs . map ( sap . ui . require ) ; if ( aModules . every ( Boolean ) ) { resolve ( aModules ) ; } else { sap . ui . require ( aURNs , function ( ) { resolve ( arguments ) ; } , reject ) ; } } ) . then ( function ( aModules ) { Object . keys ( mAlias2URN ) . forEach ( function ( sAlias , i ) { oScope [ sAlias ] = aModules [ i ] ; } ) ; } ) ; } if ( oAttribute && oAttribute . value ) { sModuleNames = oAttribute . value ; oElement . removeAttributeNode ( oAttribute ) ; if ( sModuleNames [ 0 ] === "{" ) { mAlias2URN = JSTokenizer . parseJS ( sModuleNames ) ; aURNs = Object . keys ( mAlias2URN ) . map ( function ( sAlias ) { return mAlias2URN [ sAlias ] ; } ) ; return asyncRequire ( ) ; } aURNs = sModuleNames . split ( " " ) . map ( function ( sModuleName ) { return sModuleName . replace ( / \. / g , "/" ) ; } ) ; if ( ! oViewInfo . sync ) { return asyncRequire ( ) ; } aURNs . forEach ( sap . ui . requireSync ) ; } return oSyncPromiseResolved ; }
Load required modules for the given element (a)synchronously, according to its
 "template:require" attribute which may contain either a space separated list of
 dot-separated module names or a JSON representation of a map from alias to
 slash-separated Unified Resource Names (URNs).
Load required modules for the given element ( a ) synchronously according to its " template : require " attribute which may contain either a space separated list of dot - separated module names or a JSON representation of a map from alias to slash - separated Unified Resource Names ( URNs ) .
// if all modules have been loaded already, resolve sync // Note: we do not care about edge cases where a module value is falsy /*oModule,...*/ // Note: not exactly an Array, but good enough // Note: remove the attribute because it might look like a binding and must not // reach visitAttributes // map dot-separated module names to slash-separated Unified Resource Names