hasDirtyFlexObjects(mPropertyBag) {
			if (!mPropertyBag || !mPropertyBag.selector) {
				throw Error("No selector was provided");
			}
			var oAppComponent = Utils.getAppComponentForControl(mPropertyBag.selector);
			if (!oAppComponent) {
				throw Error("App Component could not be determined");
			}

			const sReference = FlexRuntimeInfoAPI.getFlexReference({element: mPropertyBag.selector});
			var aDirtyFlexObjects = FlexObjectState.getDirtyFlexObjects(sReference);

			return aDirtyFlexObjects.some(function(oFlexObject) {
				if (oFlexObject.getLayer() !== Layer.USER) {
					return false;
				}

				if (mPropertyBag.generator && oFlexObject.getSupportInformation().generator !== mPropertyBag.generator) {
					return false;
				}

				if (mPropertyBag.changeTypes && mPropertyBag.changeTypes.indexOf(oFlexObject.getChangeType()) === -1) {
					return false;
				}

				var vSelector = oFlexObject.getSelector();
				return mPropertyBag.selector.getId() === JsControlTreeModifier.getControlIdBySelector(vSelector, oAppComponent);
			});
		}
Checks for dirty flex objects that match the given parameters.
This function can be used to determine if a restore should be enabled.

@param {object} mPropertyBag - Object with parameters as properties
@param {sap.ui.core.Control} mPropertyBag.selector - Control for which dirty flex objects are checked
@param {string} [mPropertyBag.generator] - Generator of changes
@param {string[]} [mPropertyBag.changeTypes] - Types of changes
@returns {boolean} True if the control has dirty flex objects