tangra logo
   
[ class tree: tangra_lib ] [ index: tangra_lib ] [ all elements ]
 

Class: GForm_Ctrl_With_Object_EP

Source Location: /form/gform_ctrl_with_obj_ep.class.php

Class GForm_Ctrl_With_Object_EP

Class Overview

Controller for Guarded_Form with I_DB_Storable Object with extra_param

Abstract class that provides basic infrastructure for controllers that will use Guarded_Form and I_DB_Storable objects.

Located in /form/gform_ctrl_with_obj_ep.class.php [line 29]

Tangra_Class
   |
   --Form_Ctrl
      |
      --GForm_Ctrl
         |
         --GForm_Ctrl_With_Object
            |
            --GForm_Ctrl_With_Object_EP
Author(s):
API Tags:
Abstract:  

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From GForm_Ctrl_With_Object

GForm_Ctrl_With_Object::$dbc
GForm_Ctrl_With_Object::$object
GForm_Ctrl_With_Object::$object_id_capture
GForm_Ctrl_With_Object::$object_to_form_id_links

Inherited From GForm_Ctrl

GForm_Ctrl::$form_guard
GForm_Ctrl::$form_guarded_pairs
GForm_Ctrl::$permanent_external_params
GForm_Ctrl::$processed_states
GForm_Ctrl::$vm

Inherited From Form_Ctrl

Form_Ctrl::$exports
Form_Ctrl::$form
Form_Ctrl::$form_view
Form_Ctrl::$system_name

Inherited From GForm_Ctrl_With_Object

GForm_Ctrl_With_Object::__construct()
Conctructor
GForm_Ctrl_With_Object::after_save()
Called right after object is saved.
GForm_Ctrl_With_Object::compose_add_new_event_name()
Composes name for add new event
GForm_Ctrl_With_Object::compose_object_id_event_name()
Composes name for receiving object id event
GForm_Ctrl_With_Object::create_object()
Creates and returns I_DB_Storable object.
GForm_Ctrl_With_Object::get_add_new_event()
Returns the event for adding new record
GForm_Ctrl_With_Object::get_dbc()
GForm_Ctrl_With_Object::get_object()
Returns I_DB_Storable object
GForm_Ctrl_With_Object::get_object_id_event()
Returns the event for receiving object id
GForm_Ctrl_With_Object::init_object_to_form_id_links()
Initializes array that will hold object to form_id links
GForm_Ctrl_With_Object::on_accepted_submit()
GForm_Ctrl_With_Object::on_process_submit()
Transfers data from form to object. Saves the object into DB
GForm_Ctrl_With_Object::prepare_for_show()
Prepares form for show
GForm_Ctrl_With_Object::process_add_new()
Called when receives command to show "empty" form that will be used to add new record
GForm_Ctrl_With_Object::process_object_id()
Loads object from the DB, transfers data to form, prepares for show
GForm_Ctrl_With_Object::query_object_id_capture()
Returns string for capture of the object id
GForm_Ctrl_With_Object::save_object()
Save the object into DB
GForm_Ctrl_With_Object::transfer_form2obj()
Transfers data from object to form
GForm_Ctrl_With_Object::transfer_obj2form()
Transfers date from object to form
GForm_Ctrl_With_Object::_create_object()
Ensures that create_object() returns object that is instance of I_DB_Storable

Inherited From GForm_Ctrl

GForm_Ctrl::__construct()
Constructor
GForm_Ctrl::add_processed_state()
Adds new processed state
GForm_Ctrl::compose_external_params_var_name()
GForm_Ctrl::get_permanent_external_param()
GForm_Ctrl::get_processed_state()
Returns processed state for submit identified with $form_id
GForm_Ctrl::get_vm()
Returns reference to used Vars_Mananger
GForm_Ctrl::handle_fresh_submit()
Handles fresh submit of the form.
GForm_Ctrl::handle_repeated_submit()
Handles repeated submit.
GForm_Ctrl::init_guard_vars()
Initialization of guard pairs array and permanent variable
GForm_Ctrl::is_already_processed()
Checks if this submit is already processed
GForm_Ctrl::on_accepted_submit()
Called right after submit is accepted.
GForm_Ctrl::on_process_submit()
Place for your own processing of the validated form data.
GForm_Ctrl::prepare_for_show()
Prepares form for show
GForm_Ctrl::process_submit()
Processes submit
GForm_Ctrl::query_vm()
Returns copy of used Vars_Mananger
GForm_Ctrl::retrieve_permanent_external_params()
GForm_Ctrl::set_permanent_external_param()
GForm_Ctrl::set_permanent_external_params()
GForm_Ctrl::set_vm()
Sets Vars_Manager that will be used

Inherited From Form_Ctrl

Form_Ctrl::__construct()
Constructor
Form_Ctrl::create_form()
User have to define this method and to return instance of Form
Form_Ctrl::create_form_view()
User have to define this method and to return instance of Form_View
Form_Ctrl::export()
Alias of $this->exports->add_pair()
Form_Ctrl::get_form()
Returns reference to Form object
Form_Ctrl::get_form_submit_event()
Returns form's submit event
Form_Ctrl::get_form_submit_events()
Returns events of form submission both for <input type="submit" and <input type="image"
Form_Ctrl::get_form_view()
Return reference to Form_View object
Form_Ctrl::get_system_name()
Gets name
Form_Ctrl::get_tple_exports()
Gets TPLE_Exports for the form
Form_Ctrl::on_bad_submit()
This method will be called when form submit is not good, i.e. Form_Ctrl::SUBMIT_RESULT_ERROR
Form_Ctrl::on_good_submit()
This method is called when submit is OK.
Form_Ctrl::prepare_for_show()
Descendants of Form_Ctrl may use this method to prepare the form
Form_Ctrl::process_submit()
Processes submit of the form
Form_Ctrl::query_form()
Returns copy of Form object
Form_Ctrl::query_form_view()
Returns copy of Form_View object
Form_Ctrl::set_system_name()
Sets this object's name
Form_Ctrl::_create_form()
Internally called method which sole purpose is to verify that value returned by create_form method is really a instance of Form
Form_Ctrl::_create_form_view()
Internally called method which sole purpose is to verify that value returned by create_form method is really a instance of Form_View

Inherited From Tangra_Class

Tangra_Class::get_class_name()
Alias of get_class(). Exist because of historical reasons.
Tangra_Class::__set()
Overides PHP built-in method and just throws exception if called. Purpose - to "forbid" autosetting of nonexisting class properties.

Inherited From Form_Ctrl

Form_Ctrl::SUBMIT_RESULT_ERROR
Form_Ctrl::SUBMIT_RESULT_OK

[ Top ]
Property Summary
mixed   $extra_param   Extra parameter that will be passed by top level controller (page/ajax_ctrl)

[ Top ]
Method Summary
mixed   get_extra_param()   Returns extra_param internal variable
void   on_accepted_submit()  
void   process_add_new()   Called when receives command to show "empty" form that will be used to add new record
void   set_extra_param()   Sets extra_param internal variable.
void   transfer_extra_param_internal2obj()   If extra_param is used must be overwrited and include call to appropriate set_ method of the object with extra_param as parameter
void   transfer_extra_param_obj2internal()   If extra_param is used must be overwrited and include transfer from object to $this->extra_param

[ Top ]
Properties
mixed   $extra_param [line 36]

Extra parameter that will be passed by top level controller (page/ajax_ctrl)

API Tags:
Access:  private


[ Top ]
Methods
get_extra_param  [line 99]

  mixed get_extra_param( )

Returns extra_param internal variable


API Tags:
Access:  public


[ Top ]
on_accepted_submit  [line 57]

  void on_accepted_submit( )


API Tags:
See:  GForm_Ctrl::on_accepted_submit()
Access:  protected

Information Tags:
Throws:  Tangra_Exception

Redefinition of:
GForm_Ctrl_With_Object::on_accepted_submit()

[ Top ]
process_add_new  [line 46]

  void process_add_new( )

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:
Access:  public


Redefinition of:
GForm_Ctrl_With_Object::process_add_new()
Called when receives command to show "empty" form that will be used to add new record

[ Top ]
set_extra_param  [line 89]

  void set_extra_param( mixed $param  )

Sets extra_param internal variable.

Parameters:
mixed   $param: 

API Tags:
Access:  public


[ Top ]
transfer_extra_param_internal2obj  [line 69]

  void transfer_extra_param_internal2obj( )

If extra_param is used must be overwrited and include call to appropriate set_ method of the object with extra_param as parameter

This method is called only in case of add_new_event_comp


API Tags:
Access:  protected


[ Top ]
transfer_extra_param_obj2internal  [line 79]

  void transfer_extra_param_obj2internal( )

If extra_param is used must be overwrited and include transfer from object to $this->extra_param


API Tags:
Access:  protected


[ Top ]