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

Class: Form_Field_Radio_Group

Source Location: /form/fields/radio_group/form_field_radio_group.class.php

Class Form_Field_Radio_Group

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Form_Field

Form_Field::$current_errors
Form_Field::$default_value
Form_Field::$html_value
Form_Field::$name
Form_Field::$potential_errors
Form_Field::$required
Form_Field::$type
Form_Field::$value

Inherited From Form_Field

Form_Field::__construct()
Constructor
Form_Field::accept_submit()
Accepts submit data
Form_Field::add_potential_error()
Adds potential error for the field
Form_Field::basic_check()
Performs basic check for validity
Form_Field::capture_submit()
Captures submit
Form_Field::clear_errors()
Clear current errors
Form_Field::get_default_value()
Returns default value
Form_Field::get_errors()
Return field's current errors
Form_Field::get_html_value()
Returns html_value
Form_Field::get_name()
Returns field name
Form_Field::get_potential_error()
Nonsense function. Candidate for removal
Form_Field::get_properties_array()
Returns array with field properties
Form_Field::get_required()
Returns if the field is required
Form_Field::get_type()
Returns type of the field (class name)
Form_Field::get_value()
Returns field's value
Form_Field::is_field_in_error()
Checks if field is in error
Form_Field::set_default_value()
Sets default value
Form_Field::set_error()
Sets field current error
Form_Field::set_html_value()
Sets html_value
Form_Field::set_name()
Sets field's name
Form_Field::set_required()
Sets will the field be required
Form_Field::set_to_default()
Set field's value to default value
Form_Field::set_value()
Sets field's value
Form_Field::translate_value_html2app()
Transfers data from html_value to value

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
array   $radios   Array that contains radio buttons

[ Top ]
Method Summary
Form_Field_Radio_Group   __construct()   Constructor
void   add_radio()   Adds radio button
boolean   basic_check()   Performs basic check for validity
array   get_properties_array()   Returns array with field properties
array   get_radios()   Returns all radios as array
boolean   is_unique_value()   Checks if there is a radio with same value
unknown   is_value_valid()   Checks if there is radio button with that value
void   set_radios()   Sets all radios at once using array
void   set_radio_checked()   Marks radio as checked
void   set_value()   Sets value
void   translate_value_html2app()   Transfers data from html_value to value

[ Top ]
Properties
array   $radios = array() [line 36]

Array that contains radio buttons

API Tags:
Internal:  
Access:  private


[ Top ]
Methods
Constructor __construct  [line 46]

  Form_Field_Radio_Group __construct( string $name, [integer $value = NULL], [boolean $required = false]  )

Constructor

Parameters:
string   $name:  Name of the field
integer   $value:  Default value.
boolean   $required:  Is field required. Default is false


Redefinition of:
Form_Field::__construct()
Constructor

[ Top ]
add_radio  [line 59]

  void add_radio( integer $value  )

Adds radio button

Parameters:
integer   $value:  Value of the radio button

API Tags:
Access:  public

Information Tags:
Throws:  TE_Radio_Value_Already_Exists

[ Top ]
basic_check  [line 97]

  boolean basic_check( )

Performs basic check for validity


API Tags:
Internal:  
Access:  public


Redefinition of:
Form_Field::basic_check()
Performs basic check for validity

[ Top ]
get_properties_array  [line 159]

  array get_properties_array( )

Returns array with field properties


API Tags:
Internal:  
Access:  public


Redefinition of:
Form_Field::get_properties_array()
Returns array with field properties

[ Top ]
get_radios  [line 171]

  array get_radios( )

Returns all radios as array


API Tags:
Access:  public


[ Top ]
is_unique_value  [line 183]

  boolean is_unique_value( integer $value  )

Checks if there is a radio with same value

Parameters:
integer   $value: 

API Tags:
Internal:  
Access:  private


[ Top ]
is_value_valid  [line 128]

  unknown is_value_valid( integer $value  )

Checks if there is radio button with that value

Parameters:
integer   $value: 

API Tags:
Access:  private


[ Top ]
set_radios  [line 82]

  void set_radios( array $radios_arr  )

Sets all radios at once using array

Parameters:
array   $radios_arr: 

API Tags:
Access:  public


[ Top ]
set_radio_checked  [line 202]

  void set_radio_checked( integer $value  )

Marks radio as checked

Parameters:
integer   $value:  Value of radio that will be marked as checked

API Tags:
Access:  private


[ Top ]
set_value  [line 147]

  void set_value( integer $value  )

Sets value

Parameters:
integer   $value: 

API Tags:
Access:  public


Redefinition of:
Form_Field::set_value()
Sets field's value

[ Top ]
translate_value_html2app  [line 217]

  void translate_value_html2app( )

Transfers data from html_value to value


API Tags:
Internal:  
Access:  protected


Redefinition of:
Form_Field::translate_value_html2app()
Transfers data from html_value to value

[ Top ]