define([
'Core',
'Dictionary',
+ 'EventHandler',
'./Field/Dependency/Manager',
'./Field/Field'
], function(
Core,
Dictionary,
+ EventHandler,
FormBuilderFieldDependencyManager,
FormBuilderField
) {
_forms.set(formId, form);
_fields.set(formId, new Dictionary());
+
+ EventHandler.fire('WoltLabSuite/Core/Form/Builder/Manager', 'registerForm', {
+ formId: formId
+ });
},
/**
throw new Error("Unknown form with id '" + formId + "'.");
}
+ EventHandler.fire('WoltLabSuite/Core/Form/Builder/Manager', 'beforeUnregisterForm', {
+ formId: formId
+ });
+
_forms.delete(formId);
_fields.get(formId).forEach(function(field) {
_fields.delete(formId);
FormBuilderFieldDependencyManager.unregister(formId);
+
+ EventHandler.fire('WoltLabSuite/Core/Form/Builder/Manager', 'afterUnregisterForm', {
+ formId: formId
+ });
}
};
});