This class requires a callback that creates the actual object that should be created in a correct way. The implementation contained in this class should be able to avoid ghost object in almost all cases. The only thing that is not fully catchable here are cases where the type validation fails. But since all type validation rules are mappable to QuickForm rules, this problem should not appear.
Temporary objects (as initially created by the nullstorge implementations) will be memorized using a hidden form variable.
The callback is defined using the $callback_object and $callback_method members of this class. Only the first one is mandatory, the method name defaults to dm2_create_callback.
the reference should propagate this. use a callback to work.
Optionally you may set defaults and the schemaname to use as well.
stringThe form identifier
If processing is successful and the form is in 'save'ed state, the storage backend is cast to a standard midgard object, any temporary resources are moved to there, and the formdata is saved.
There are several possible return values:
The form will be automatically validated for 'save' and 'next', but not for 'previous'.
Normally, all validation should be done during the Form processing, but sometimes this is not possible. These are the cases where type validation rules fail instead of form validation ones. At this time, the integration of type validation is rudimentary and will transparently return edit instead of validation.
|todo||Integrate type validation checks cleanly.|
stringOne of 'save', 'cancel', 'next', 'previous', 'edit', depending on the schema configuration.
This defaults to _dm2_create_callback. If this member is changed, it must be done prior initialization.
This reference must be set prior initialization.
This array is indexed by field names.
If this is left to null, the first schema from the database is used instead.