function getBindings(oElement, oParentDefaultModel, bTemplate, sAggregationName) {
		var aBindings = (
			bTemplate
			? getBindingsFromTemplateProperties(oElement)
			: getBindingsFromProperties(oElement, oParentDefaultModel)
		);
		var aAggregationNames = sAggregationName ? [ sAggregationName ] : Object.keys(oElement.getMetadata().getAllAggregations());

		aAggregationNames.forEach(function (sAggregationNameInLoop) {
			aBindings = aBindings.concat(getBindingsForAggregation(oElement, oParentDefaultModel, bTemplate, sAggregationNameInLoop));
		});

		return aBindings;
	}
function getBindings(oElement, oParentDefaultModel, bTemplate, sAggregationName) {
		var aBindings = (
			bTemplate
			? getBindingsFromTemplateProperties(oElement)
			: getBindingsFromProperties(oElement, oParentDefaultModel)
		);
		var aAggregationNames = sAggregationName ? [ sAggregationName ] : Object.keys(oElement.getMetadata().getAllAggregations());

		aAggregationNames.forEach(function (sAggregationNameInLoop) {
			aBindings = aBindings.concat(getBindingsForAggregation(oElement, oParentDefaultModel, bTemplate, sAggregationNameInLoop));
		});

		return aBindings;
	}
function getBindings ( oElement , oParentDefaultModel , bTemplate , sAggregationName ) { var aBindings = ( bTemplate ? getBindingsFromTemplateProperties ( oElement ) : getBindingsFromProperties ( oElement , oParentDefaultModel ) ) ; var aAggregationNames = sAggregationName ? [ sAggregationName ] : Object . keys ( oElement . getMetadata ( ) . getAllAggregations ( ) ) ; aAggregationNames . forEach ( function ( sAggregationNameInLoop ) { aBindings = aBindings . concat ( getBindingsForAggregation ( oElement , oParentDefaultModel , bTemplate , sAggregationNameInLoop ) ) ; } ) ; return aBindings ; }
Gets bindings for the whole hierarchy of children for a specified Element
and filters out bindings which are not relevant (based on the parent model)

@param {sap.ui.core.Control} oElement - Starting point of the search
@param {sap.ui.model.Model} oParentDefaultModel - Model for filtering irrelevant binding paths
@param {boolean} [bTemplate] - Whether we should consider provided element as a template
@param {string} [sAggregationName] - if aggregation name is given then only for this aggregation bindings are returned, if not then all aggregations are considered
@returns {Array} - returns array with all relevant bindings for all properties of the element

@private
Gets bindings for the whole hierarchy of children for a specified Element and filters out bindings which are not relevant ( based on the parent model )
Get bindings for the given element