GForm_Ctrl_With_Object __construct(
string
$system_name, Vars_Manager
$vm, DB_Connection
$dbc, [string
$object_id_capture = 'obj_id']
)
|
|
Conctructor
Parameters:
|
string |
$system_name: |
Controller's name |
|
Vars_Manager |
$vm: |
Permanent Vars_Manager that will be used. Session of Thread VM |
|
DB_Connection |
$dbc: |
Database connection |
|
string |
$object_id_capture: |
This string will be searched in $_GET to capture object id |
Redefinition of:
- GForm_Ctrl::__construct()
- Constructor
Called right after object is saved.
Useful for some post processing. For example: notifying other controllers, etc.
API Tags:
string compose_add_new_event_name(
)
|
|
Composes name for add new event
API Tags:
string compose_object_id_event_name(
)
|
|
Composes name for receiving object id event
API Tags:
Creates and returns I_DB_Storable object.
This method have to be implemented by the user. At the end I_DB_Storable object have to be returned.
API Tags:
| Abstract: | |
| Access: | protected |
Returns the event for adding new record
API Tags:
Returns I_DB_Storable object
API Tags:
Returns the event for receiving object id
API Tags:
void init_object_to_form_id_links(
)
|
|
Initializes array that will hold object to form_id links
API Tags:
void on_accepted_submit(
)
|
|
API Tags:
Information Tags:
Redefinition of:
- GForm_Ctrl::on_accepted_submit()
- Called right after submit is accepted.
Redefined in descendants as:
void on_process_submit(
)
|
|
Transfers data from form to object. Saves the object into DB
API Tags:
Redefinition of:
- GForm_Ctrl::on_process_submit()
- Place for your own processing of the validated form data.
Called when receives command to show "empty" form that will be used to add new record
Transfers data to form, prepares for show
API Tags:
Redefined in descendants as:
void process_object_id(
integer
$object_id
)
|
|
Loads object from the DB, transfers data to form, prepares for show
Parameters:
|
integer |
$object_id: |
- ID of the object |
API Tags:
Information Tags:
string query_object_id_capture(
)
|
|
Returns string for capture of the object id
API Tags:
Save the object into DB
Please note that saving is in DB transaction.
API Tags:
void transfer_form2obj(
)
|
|
Transfers data from object to form
User have to implement this method and to transfer each field from form to object Example:
$object->set_name($form->get_field_value('name'));
API Tags:
| Abstract: | |
| Access: | protected |
void transfer_obj2form(
)
|
|
Transfers date from object to form
User have to implement this method and to transfer each field from object to form
Example:
$form->set_field_value('name', $object->get_name());
API Tags:
| Abstract: | |
| Access: | protected |
Ensures that create_object() returns object that is instance of I_DB_Storable
API Tags:
Information Tags: