Squiz Matrix
4.12.2
|
Public Member Functions | |
DateTime_Field ($prefix, &$value, &$parameters) | |
setValue (&$value) | |
setParameters (&$parameters) | |
& | getParam ($code='') |
printField () | |
inputBox ($u, $prefix, &$value, $allow_null=FALSE) | |
getUnit ($unit, $value='') | |
shortMonth ($m='', $invert=FALSE) | |
longMonth ($m='', $invert=FALSE) | |
processField () | |
validateValue ($value) | |
strToUnitsArray ($value) | |
unitsArrayToStr ($v) | |
format ($format=NULL) | |
printMinField () | |
processMinField () | |
printMaxField () | |
processMaxField () | |
printEditOptions ($show=Array()) | |
processEditOptions () | |
isEmpty () | |
Data Fields | |
$prefix ='' | |
$value ='' | |
$parameters ='' | |
Definition at line 35 of file datetime_field.inc.
DateTime_Field | ( | $prefix, | |
& | $value, | ||
& | $parameters | ||
) |
Constructor
int | $prefix | prefix for form elements |
string | &$value | current value of the field |
array | &$parameters | settings for this field (min, max, show etc) |
Definition at line 98 of file datetime_field.inc.
format | ( | $format = NULL | ) |
Uses date() to format a value in a given way
string | $format | the format to print the date in (PHP date format string) |
public
Definition at line 780 of file datetime_field.inc.
& getParam | ( | $code = '' | ) |
Get a parameter from the parameters array
string | $code | the name of the parameter |
public
Definition at line 145 of file datetime_field.inc.
getUnit | ( | $unit, | |
$value = '' |
|||
) |
Extracts the value of a particular unit from the full value
string | $unit | the unit to find the value for |
string | &$value | current value of the field |
public
Definition at line 431 of file datetime_field.inc.
inputBox | ( | $u, | |
$prefix, | |||
& | $value, | ||
$allow_null = FALSE |
|||
) |
Prints an input box for a particular unit
string | $u | the unit to print |
string | $prefix | prefix for elements |
string | &$value | current value of the unit |
boolean | $allow_null | allow null value (ie blank string) |
public
Definition at line 238 of file datetime_field.inc.
isEmpty | ( | ) |
Returns TRUE if the datetime field is blank, FALSE otherwise
Definition at line 1080 of file datetime_field.inc.
longMonth | ( | $m = '' , |
|
$invert = FALSE |
|||
) |
Given a month name or number, returns the long name
string | $m | the month number or name |
boolean | $invert | are you passing in the short name? |
public
Definition at line 500 of file datetime_field.inc.
printEditOptions | ( | $show = Array() | ) |
Prints the edit options form
Array | $show | an array of keys telling which parts of the interface must be printed |
public
Definition at line 938 of file datetime_field.inc.
printField | ( | ) |
Prints the interface for filling in a value
public
Definition at line 171 of file datetime_field.inc.
printMaxField | ( | ) |
Prints fields for inputting the max value
public
Definition at line 891 of file datetime_field.inc.
printMinField | ( | ) |
Prints fields for inputting the min value
public
Definition at line 846 of file datetime_field.inc.
processEditOptions | ( | ) |
Processes the input in edit options form
public
Definition at line 1052 of file datetime_field.inc.
processField | ( | ) |
Processes the interface for filling in a value
public
Definition at line 518 of file datetime_field.inc.
processMaxField | ( | ) |
processMinField | ( | ) |
setParameters | ( | & | $parameters | ) |
Sets a reference to the parameters of this field
array | &$parameters | the parameters to set |
public
Definition at line 130 of file datetime_field.inc.
setValue | ( | & | $value | ) |
Sets a reference to the value of this field
string | &$value | the value to set |
public
Definition at line 115 of file datetime_field.inc.
shortMonth | ( | $m = '' , |
|
$invert = FALSE |
|||
) |
Given a month name or number, returns the short name
string | $m | the month number or name |
boolean | $invert | are you passing in the short name? |
public
Definition at line 479 of file datetime_field.inc.
strToUnitsArray | ( | $value | ) |
Converts a datetime string "yyyy-mm-dd hh:ii:ss" to an array with an int for each unit. -1 = 'null'
string | $value | the value to convert in "yyyy-mm-dd hh:ii:ss" format |
public
Definition at line 727 of file datetime_field.inc.
unitsArrayToStr | ( | $v | ) |
Converts an array with an int for each unit to a datetime string "yyyy-mm-dd hh:ii:ss"
array | $value | the array to convert |
public
Definition at line 752 of file datetime_field.inc.
validateValue | ( | $value | ) |
Validates the value to ensure it is in the correct format
string | $value | the value to check |
public
Definition at line 540 of file datetime_field.inc.