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

Class: Form_Field_Date_Triad

Source Location: /form/fields/date_triad/form_field_date_triad.class.php

Class Form_Field_Date_Triad

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
integer   $day   Day holder
integer   $month   Month holder
integer   $year   Year holder

[ Top ]
Method Summary
Form_Field_Date_Triad   __construct()   Constructor
boolean   basic_check()   Performs basic check for validity
void   capture_submit()   Captures submit
integer   get_day()   Returns day
integer   get_month()   Returns month
integer   get_year()   Returns year
void   set_value()   Sets field value
void   _set_value()   Sets field value

[ Top ]
Properties
integer   $day [line 37]

Day holder

API Tags:
Internal:  
Access:  private


[ Top ]
integer   $month [line 44]

Month holder

API Tags:
Internal:  
Access:  private


[ Top ]
integer   $year [line 51]

Year holder

API Tags:
Internal:  
Access:  private


[ Top ]
Methods
Constructor __construct  [line 61]

  Form_Field_Date_Triad __construct( string $name, [boolean $required = false], [string $value = '0000-00-00']  )

Constructor

Parameters:
string   $name:  Name of the field
boolean   $required:  Is field required?
string   $value:  Default value. Must be valid date in YYYY-MM-DD format or 0000-00-00


Redefinition of:
Form_Field::__construct()
Constructor

[ Top ]
basic_check  [line 129]

  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 ]
capture_submit  [line 93]

  void capture_submit( form_name $form_name, &$submit_array, array $submit_array  )

Captures submit

Parameters:
form_name   $form_name: 
array   $submit_array: 
   &$submit_array: 

API Tags:
Internal:  
Access:  public


Redefinition of:
Form_Field::capture_submit()
Captures submit

[ Top ]
get_day  [line 153]

  integer get_day( )

Returns day


API Tags:
Access:  public


[ Top ]
get_month  [line 163]

  integer get_month( )

Returns month


API Tags:
Access:  public


[ Top ]
get_year  [line 173]

  integer get_year( )

Returns year


API Tags:
Access:  public


[ Top ]
set_value  [line 73]

  void set_value( $value, string $value.  )

Sets field value

Parameters:
string   $value.:  Must be valid date in YYYY-MM-DD format or 0000-00-00
   $value: 

API Tags:
Access:  public


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

[ Top ]
_set_value  [line 184]

  void _set_value( string $value  )

Sets field value

Parameters:
string   $value: 

API Tags:
Internal:  
Access:  private


[ Top ]