src/sap.m/src/sap/m/BarInPageEnabler.js
function (sContext) {
			var oOptions = this._getContextOptions(sContext);

			if (!oOptions) {
				return this;
			}

			if (!this.isContextSensitive) {
				Log.error("The bar control you are using does not implement all the members of the IBar interface", this);
				return this;
			}

			//If this class does not gets added by the renderer, add it here
			if (!this.getRenderer().shouldAddIBarContext()) {
				this.addStyleClass(IBAR_CSS_CLASS + "-CTX");
			}

			if (this.isContextSensitive()) {
				this.addStyleClass(oOptions.contextClass);
			}

			return this;
		}
function (sContext) {
			var oOptions = this._getContextOptions(sContext);

			if (!oOptions) {
				return this;
			}

			if (!this.isContextSensitive) {
				Log.error("The bar control you are using does not implement all the members of the IBar interface", this);
				return this;
			}

			//If this class does not gets added by the renderer, add it here
			if (!this.getRenderer().shouldAddIBarContext()) {
				this.addStyleClass(IBAR_CSS_CLASS + "-CTX");
			}

			if (this.isContextSensitive()) {
				this.addStyleClass(oOptions.contextClass);
			}

			return this;
		}
function ( sContext ) { var oOptions = this . _getContextOptions ( sContext ) ; if ( ! oOptions ) { return this ; } if ( ! this . isContextSensitive ) { Log . error ( "The bar control you are using does not implement all the members of the IBar interface" , this ) ; return this ; } //If this class does not gets added by the renderer, add it here if ( ! this . getRenderer ( ) . shouldAddIBarContext ( ) ) { this . addStyleClass ( IBAR_CSS_CLASS + "-CTX" ) ; } if ( this . isContextSensitive ( ) ) { this . addStyleClass ( oOptions . contextClass ) ; } return this ; }
Sets classes according to the context of the page.

Possible contexts are header, footer, subheader.
@param {string} sContext allowed values are header, footer, subheader.
@returns {sap.m.IBar} <code>this</code> for chaining
@sap-restricted
@private
Sets classes according to the context of the page .