function mixinControllerDefinition(oController, CustomControllerDef, sLocalNameSpace) {
			if (CustomControllerDef instanceof ControllerExtension) {
				applyExtension(oController, CustomControllerDef, sLocalNameSpace);
			} else if (CustomControllerDef.getMetadata && CustomControllerDef.getMetadata().getStereotype() == "controllerextension") {
				//create ControllerExtension instance
				var oControllerExtension = new CustomControllerDef();
				applyExtension(oController, oControllerExtension, sLocalNameSpace);
			} else {
				//apply 'legacy' extension
				var mLifecycleConfig = ControllerExtension.getMetadata().getLifecycleConfiguration();
				for (var sMemberName in CustomControllerDef) {
					if (sMemberName in mLifecycleConfig) {
						ControllerExtension.overrideMethod(sMemberName, oController, CustomControllerDef, oController, mLifecycleConfig[sMemberName].overrideExecution);
					} else {
						//default extension behavior
						ControllerExtension.overrideMethod(sMemberName, oController, CustomControllerDef);
					}
				}
			}
		}
/*
		 * Mixin controller extensions
		 * @param {sap.ui.core.mvc.Controller} oController The controller to apply the extensions
		 * @param {object} oCustomControllerDef The controller extension definition
		 * @private
		 */
Mixin controller extensions
@param {sap.ui.core.mvc.Controller} oController The controller to apply the extensions
@param {object} oCustomControllerDef The controller extension definition
@private
Mixin controller extensions @param { sap . ui . core . mvc . Controller } oController The controller to apply the extensions @param { object } oCustomControllerDef The controller extension definition @private
function mixinControllerDefinition(oController, CustomControllerDef, sLocalNameSpace) {
			if (CustomControllerDef instanceof ControllerExtension) {
				applyExtension(oController, CustomControllerDef, sLocalNameSpace);
			} else if (CustomControllerDef.getMetadata && CustomControllerDef.getMetadata().getStereotype() == "controllerextension") {
				var oControllerExtension = new CustomControllerDef();
				applyExtension(oController, oControllerExtension, sLocalNameSpace);
			} else {
				var mLifecycleConfig = ControllerExtension.getMetadata().getLifecycleConfiguration();
				for (var sMemberName in CustomControllerDef) {
					if (sMemberName in mLifecycleConfig) {
						ControllerExtension.overrideMethod(sMemberName, oController, CustomControllerDef, oController, mLifecycleConfig[sMemberName].overrideExecution);
					} else {
						ControllerExtension.overrideMethod(sMemberName, oController, CustomControllerDef);
					}
				}
			}
		}
function mixinControllerDefinition ( oController , CustomControllerDef , sLocalNameSpace ) { if ( CustomControllerDef instanceof ControllerExtension ) { applyExtension ( oController , CustomControllerDef , sLocalNameSpace ) ; } else if ( CustomControllerDef . getMetadata && CustomControllerDef . getMetadata ( ) . getStereotype ( ) == "controllerextension" ) { var oControllerExtension = new CustomControllerDef ( ) ; applyExtension ( oController , oControllerExtension , sLocalNameSpace ) ; } else { var mLifecycleConfig = ControllerExtension . getMetadata ( ) . getLifecycleConfiguration ( ) ; for ( var sMemberName in CustomControllerDef ) { if ( sMemberName in mLifecycleConfig ) { ControllerExtension . overrideMethod ( sMemberName , oController , CustomControllerDef , oController , mLifecycleConfig [ sMemberName ] . overrideExecution ) ; } else { ControllerExtension . overrideMethod ( sMemberName , oController , CustomControllerDef ) ; } } } }
Mixin controller extensions
 @param {sap.ui.core.mvc.Controller} oController The controller to apply the extensions
 @param {object} oCustomControllerDef The controller extension definition
 @private
Mixin controller extensions @param { sap . ui . core . mvc . Controller } oController The controller to apply the extensions @param { object } oCustomControllerDef The controller extension definition @private
//create ControllerExtension instance //apply 'legacy' extension //default extension behavior