Class: I2CE FormField DB DATE: Difference between revisions

From IHRIS Wiki
No edit summary
 
(16 intermediate revisions by one other user not shown)
Line 1: Line 1:
This article describes the ''abstract'' class ''I2CE_FormField_DB_DATE''.
#REDIRECT [[Class: I2CE_FormField_DB_DATE (4.1.12)]]
*Extends the class: [[Class: I2CE_FormField | I2CE_FormField]].
*Parent Classses:  [[Class: I2CE_FormField | I2CE_FormField]] [[Class: I2CE_Fuzzy | I2CE_Fuzzy]]
*Child Classes:
** [[Class: I2CE_FormField_DATE_HMS | I2CE_FormField_DATE_HMS]]
** [[Class: I2CE_FormField_DATE_MD | I2CE_FormField_DATE_MD]]
** [[Class: I2CE_FormField_DATE_TIME | I2CE_FormField_DATE_TIME]]
** [[Class: I2CE_FormField_DATE_Y | I2CE_FormField_DATE_Y]]
** [[Class: I2CE_FormField_DATE_YMD | I2CE_FormField_DATE_YMD]]
*Location: Part of the module [[I2CE Module List#forms|forms]] in the package [https://launchpad.net/i2ce I2CE]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.0-release/annotate/head:/modules/Forms/lib/fields/I2CE_FormField_DB_DATE.php modules/Forms/lib/fields/I2CE_FormField_DB_DATE.php]
*Author: Luke Duncan <lduncan@intrahealth.org>
*Since: v2.0.0
Class for defining all the database fields used by a [[Class: I2CE_Form | ]] object.
==Constants==
===I2CE_FormField_DB_DATE::FIELD_TYPE_I2CE===
A string type for the field
Defined as: 'date'
===I2CE_FormField_DB_DATE::FIELD_TYPE_DB===
The database type for the field
Defined as: 'datetime default NULL'
===I2CE_FormField_DB_DATE::FIELD_TYPE_MDB2===
The MDB2 type for the field.
Defined as: 'timestamp'
==Variables==
===$start_year===
The start year for drop downs for picking the year if this is a date.
*Type: protected integer $start_year
 
===$end_year===
The end year for drop downs for picking the year if this is a date.
*Type: protected integer $end_year
 
==Methods==
===__construct()===
Create a new instance of a I2CE_FormField
*Signature: public function __construct($name,$options)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $name
** [http://www.php.net/manual/en/language.types.array.php array ] $options <br/>A list of options for this form field.
===compare()===
Compares this form field agains the given form field.
*Signature: public function compare($db_value)
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $db_value <br/>Either a DB Value or an I2CE_FormField
*Returns: -1,0,1
===getDBValue()===
Returns the value of this field ready to be stored in the database.
*Signature: public function getDBValue()
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]
===getDisplayValue()===
Returns the value of this field as a human readable format.
*Signature: public function getDisplayValue($entry)
*Parameters:
** [[Class: I2CE_Entry | I2CE_Entry]] $entry <br/>If a I2CE_Entry object has been passed to this method then it will return the value for that entry assuming it's an entry for this field.
***Default Value: false
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]
===getFromDB()===
Return the value of this field from the database format for the given type @param integer $type The type of the field to be returned.
*Signature: public function getFromDB($value)
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $value
===getYearRange()===
Return the year range for this field if it's a date.
*Signature: public function getYearRange()
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]@global array
===isSameValue()===
Check to see if the given DB value is equivalent to this value. @param mixed $value
*Signature: public function isSameValue($db_value)
*Parameters:
**$db_value
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===isValid()===
Checks to see if the current value for this is set and valid.
*Signature: public function isValid()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===issetValue()===
Checks to see if the value has been set.
*Signature: public function issetValue()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===setYearRange()===
*Signature: public function setYearRange($start,$end)
*Parameters:
**$start
**$end
***Default Value: 0
==Fuzzy Methods==
===generateLimit_in()===
This method is implemented by [[Class: I2CE_Module_FormLimits#generateLimit_DB_DATE_in() | I2CE_Module_FormLimits->generateLimit_DB_DATE_in() ]]
===generateLimit_greaterthan_now()===
This method is implemented by [[Class: I2CE_Module_FormLimits#generateLimit_greaterthan_now() | I2CE_Module_FormLimits->generateLimit_greaterthan_now() ]]
===generateLimit_lessthan_now()===
This method is implemented by [[Class: I2CE_Module_FormLimits#generateLimit_lessthan_now() | I2CE_Module_FormLimits->generateLimit_lessthan_now() ]]
===checkLimit_in()===
This method is implemented by [[Class: I2CE_Module_FormLimits#checkLimit_DB_DATE_in() | I2CE_Module_FormLimits->checkLimit_DB_DATE_in() ]]
===checkLimitString_in()===
This method is implemented by [[Class: I2CE_Module_FormLimits#checkLimitString_DB_DATE_in() | I2CE_Module_FormLimits->checkLimitString_DB_DATE_in() ]]
===getLimitMenu_in()===
This method is implemented by [[Class: I2CE_Module_FormLimits#I2CE_FormField_DB_DATE_DISPLAYFIELDSTYLE_in() | I2CE_Module_FormLimits->I2CE_FormField_DB_DATE_DISPLAYFIELDSTYLE_in() ]]
===processLimitMenu_in()===
This method is implemented by [[Class: I2CE_Module_FormLimits#I2CE_FormField_DB_DATE_PROCESSFIELDSTYLE_in() | I2CE_Module_FormLimits->I2CE_FormField_DB_DATE_PROCESSFIELDSTYLE_in() ]]
===checkLimit_greaterthan_now()===
This method is implemented by [[Class: I2CE_Module_FormLimits#checkLimit_DB_DATE_greaterthan_now() | I2CE_Module_FormLimits->checkLimit_DB_DATE_greaterthan_now() ]]
===checkLimitString_greaterthan_now()===
This method is implemented by [[Class: I2CE_Module_FormLimits#checkLimitString_DB_DATE_greaterthan_now() | I2CE_Module_FormLimits->checkLimitString_DB_DATE_greaterthan_now() ]]
===getLimitMenu_greaterthan_now()===
This method is implemented by [[Class: I2CE_Module_FormLimits#I2CE_FormField_DB_DATE_DISPLAYFIELDSTYLE_greaterthan_now() | I2CE_Module_FormLimits->I2CE_FormField_DB_DATE_DISPLAYFIELDSTYLE_greaterthan_now() ]]
===processLimitMenu_greaterthan_now()===
This method is implemented by [[Class: I2CE_Module_FormLimits#I2CE_FormField_DB_DATE_PROCESSFIELDSTYLE_greaterthan_now() | I2CE_Module_FormLimits->I2CE_FormField_DB_DATE_PROCESSFIELDSTYLE_greaterthan_now() ]]
===checkLimit_lessthan_now()===
This method is implemented by [[Class: I2CE_Module_FormLimits#checkLimit_DB_DATE_lessthan_now() | I2CE_Module_FormLimits->checkLimit_DB_DATE_lessthan_now() ]]
===checkLimitString_lessthan_now()===
This method is implemented by [[Class: I2CE_Module_FormLimits#checkLimitString_DB_DATE_lessthan_now() | I2CE_Module_FormLimits->checkLimitString_DB_DATE_lessthan_now() ]]
===getLimitMenu_lessthan_now()===
This method is implemented by [[Class: I2CE_Module_FormLimits#I2CE_FormField_DB_DATE_DISPLAYFIELDSTYLE_lessthan_now() | I2CE_Module_FormLimits->I2CE_FormField_DB_DATE_DISPLAYFIELDSTYLE_lessthan_now() ]]
===processLimitMenu_lessthan_now()===
This method is implemented by [[Class: I2CE_Module_FormLimits#I2CE_FormField_DB_DATE_PROCESSFIELDSTYLE_lessthan_now() | I2CE_Module_FormLimits->I2CE_FormField_DB_DATE_PROCESSFIELDSTYLE_lessthan_now() ]]
 
 
[[Category:Class Documentation]]

Latest revision as of 09:44, 18 August 2015