function getBindingsForAggregation(oElement, oModel, bTemplate, sAggregationName, oRelevantContainerElement, iDepth) {
		const oElementModel = oElement.getModel();

		const oBinding = oElement.getBindingInfo(sAggregationName);
		const oTemplate = oBinding && oBinding.template;

		// If a template is found for a different model, we don't look inside the template
		// e.g. a Select control whose entries are defined in an own JSON model
		if (oTemplate && oElementModel && oElementModel !== oModel) {
			return [];
		}

		// If a template is bound to the current element on the given model,
		// we continue the evaluation on the template (as it has no direct parent)
		const bIsInTemplate = oTemplate ? true : bTemplate;
		const aElements = oTemplate ? [oTemplate] : ElementUtil.getAggregation(oElement, sAggregationName);

		let aBindings = [];
		// Getting children of the current aggregation and iterating through all of them
		aElements.forEach(function(oChildElement) {
			if (oChildElement.getMetadata) {
				if (isElementRelatedToRelevantContainer(oElement, oRelevantContainerElement)) {
					// Fetching bindings from Element and all children of Element
					aBindings = aBindings.concat(bIsInTemplate
						? getBindingsFromTemplateProperties(oChildElement, oElement, oModel)
						: BindingsExtractor.getBindingsFromProperties(oChildElement, oModel));
				}
				aBindings = aBindings.concat(
					BindingsExtractor.getBindings({
						element: oChildElement,
						model: oModel,
						template: bIsInTemplate,
						relevantContainerElement: oRelevantContainerElement,
						parent: oElement,
						depth: iDepth
					})
				);
			}
		});

		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 given model)

@param {object} mPropertyBag - PropertyBag
@param {sap.ui.core.Control} mPropertyBag.element - Starting point of the search
@param {sap.ui.model.Model} [mPropertyBag.model] - Model for filtering irrelevant binding paths
@param {boolean} [mPropertyBag.template] - Whether we should consider provided element as a template or part of a template
@param {string} [mPropertyBag.aggregationName] - if aggregation name is given then only for this aggregation bindings are returned, if not then all aggregations are considered
@param {sap.ui.core.Control} [mPropertyBag.relevantContainerElement] - if this element is given then only bindings from element related to the relevant container are considered
@param {sap.ui.core.Control} [mPropertyBag.parent] - parent of the element being evaluated; if the element is a template, the parent is the control hosting the template
@returns {Array} - returns array with all relevant bindings for all properties of the element

@private