Interface for create-type handlers

package midcom.helper.datamanager2

 Methods

dm2_create_callback (\midcom_helper_datamanager2_controller_create $controller)

DM2 callback, has to create the new DBA object

It must return a reference to a freshly created object that should be populated with the validated form data. It receives a reference to the controller instance calling it.

If the callback is unable to create an empty object for whatever reason, you should throw midcom_error. There is no error handling whatsoever on the side of the controller instance. If the function returns, a valid instance is expected.

Parameters

$controller

\midcom_helper_datamanager2_controller_create&$controller The current controller

Returns

\midcom_core_dbaobjectThe newly-created object