This mixin should be used for plugins that can be saved in the BlueConic UI. It offers a generic method for plugins to implement custom logic before an item is actually saved. Previously, "getParameters" was used for this.
Example
define([
"blueconic/api/widgets/plugins/mixins/_BaseSave"
], function(_BaseSave) {
// ...
});
Functions
-
beforeSave(domainObjectToSave)undefined | dojo/Deferred
-
This method can be implemented to hook into the "save" (before) event of the containing domain object. Either return nothing or a {dojo/Deferred}, which is waited on before actually saving the domain object.
Name Type Description domainObjectToSave blueconic.api.data.domain._Base The domain object that's going to be saved.
Returns:
Type Description undefined |
dojo/DeferredNothing or a deferred when the function is asynchronous