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

Class: Form_View

Source Location: /form/form_view.class.php

Class Form_View

Descendants
Child Class Description
Guardable_Form_View View for Guardable_Form

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

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.

[ Top ]
Property Summary
string   $charset   Charset that will be used to prepare data of the fields (escaping with htmleentities)
array   $fields_views   Views of form fields
Form   $form   Form for which is current view

[ Top ]
Method Summary
Form_View   __construct()   Constructor
void   add_field_view()   Adds field's view object
string   get_charset()   Returns charset
Form_Field_View   &get_field_view()   Returns Form_Field_View object of field specified with $field_view
TPLE_Exports   get_field_view_exports()   Returns exports of field view
TPLE_Exports   get_tple_exports()   Returns TPLE exports of the form
void   set_charset()   Sets charset that field views will use for escaping field data (i.e. htmlentities)
void   set_charset_cascade()   Sets charset of the form view and cycles all field views to pass them the charset (calling their set_charset method)

[ Top ]
Properties
string   $charset = 'UTF-8' [line 71]

Charset that will be used to prepare data of the fields (escaping with htmleentities)

Default value is UTF-8

API Tags:
Access:  protected


[ Top ]
array   $fields_views = array() [line 62]

Views of form fields

API Tags:
Internal:  
Access:  private


[ Top ]
Form   $form [line 53]

Form for which is current view

API Tags:
Internal:  
Access:  private


[ Top ]
Methods
Constructor __construct  [line 80]

  Form_View __construct( Form &$form, Form $form  )

Constructor

Parameters:
Form   $form: 
Form   &$form: 


Redefined in descendants as:

[ Top ]
add_field_view  [line 118]

  void add_field_view( strinfg$field_name $field_name, Form_Field_View $field_view  )

Adds field's view object

Each form field have to have own field view object.

Parameters:
Form_Field_View   $field_view:  - view object
strinfg$field_name   $field_name:  Name of the field

API Tags:
Access:  public

Information Tags:
Throws:  TE_Key_Already_Exists

[ Top ]
get_charset  [line 176]

  string get_charset( )

Returns charset


API Tags:
Access:  public


[ Top ]
get_field_view  [line 151]

  Form_Field_View &get_field_view( string $field_name  )

Returns Form_Field_View object of field specified with $field_view

Parameters:
string   $field_name:  Name of the field

API Tags:
Access:  public


[ Top ]
get_field_view_exports  [line 134]

  TPLE_Exports get_field_view_exports( string $field_name  )

Returns exports of field view

Parameters:
string   $field_name:  Name of the field

API Tags:
Internal:  
Access:  private


[ Top ]
get_tple_exports  [line 93]

  TPLE_Exports get_tple_exports( )

Returns TPLE exports of the form

Returns object of class TPLE_Exports that contains all "assigns" required for correct HTML presentation of the form


API Tags:
Access:  public


Implementation of:
I_Static_Viewable::get_tple_exports()

[ Top ]
set_charset  [line 165]

  void set_charset( string $charset  )

Sets charset that field views will use for escaping field data (i.e. htmlentities)

Parameters:
string   $charset: 

API Tags:
Access:  public


[ Top ]
set_charset_cascade  [line 186]

  void set_charset_cascade( [string $charset = 'UTF-8']  )

Sets charset of the form view and cycles all field views to pass them the charset (calling their set_charset method)

Default value for parameter $charset is UTF-8

Parameters:
string   $charset: 

API Tags:
Access:  public


[ Top ]