Class DateTimeField

Description

a textfield designed for date-time data

Located in /inc/formslib/datetimefield.php (line 36)

Field
   |
   --DateTimeField
Variable Summary
Method Summary
DateTimeField DateTimeField (string $name, [string $longname = ''], [string $description = ''])
void displayInTable ([ $cols = 3])
void hidden ()
void isValid ()
void selectable ()
void set ( $value)
void setEditableOutput (SimpleDate $date, SimpleTime $time)
void setManualRepresentation (integer $flag)
void setSlots (TimeSlotRule $list)
void setSlotStart (string $date)
string sqlSetStr ([ $name = ''], [ $force = false])
boolean update (array $data)
Variables
SimpleDate $date (line 42)
  • var: date part of the field
boolean $dateeditable (line 44)
  • var: date part is editable
array $list (line 46)
  • var: list of possible choices for the day
integer $representation (line 49)
  • var: current representation of the time part (TF_* defines in TimeField class
SimpleTime $time (line 38)
  • var: time part of the field
boolean $timeeditable (line 40)
  • var: time part is editable
integer $_manualRepresentation = TF_AUTO (line 51)
  • var: manually specified representation of the time part (TF_* defines in TimeField class

Inherited Variables

Inherited from Field

Field::$attr
Field::$changed
Field::$DEBUG
Field::$defaultValue
Field::$description
Field::$duplicateName
Field::$editable
Field::$errorclass
Field::$hidden
Field::$isValid
Field::$isValidTest
Field::$longname
Field::$name
Field::$namebase
Field::$notifyIdChange
Field::$oob_errorMessage
Field::$oob_status
Field::$ovalue
Field::$required
Field::$requiredTwoStage
Field::$sqlHidden
Field::$suppressValidation
Field::$useNullValues
Field::$value
Field::$valueCleaner
Methods
Constructor DateTimeField (line 60)

Create a new datetimefield object

DateTimeField DateTimeField (string $name, [string $longname = ''], [string $description = ''])
  • string $name: the name of the field (db name, and html field name
  • string $longname: long name to be used in the label of the field in display
  • string $description: used in the html title or longdesc for the field
calcDateTimeParts (line 107)

calculate the correct values for the separate (and possibly not editable!) parts of the field

void calcDateTimeParts ()
displayInTable (line 68)
void displayInTable ([ $cols = 3])
  • $cols

Redefinition of:
Field::displayInTable()
render this form widget in an html table
hidden (line 100)
void hidden ()

Redefinition of:
Field::hidden()
html representation of this field as a "hidden" form widget
isValid (line 176)

isValid test (extend Field::isValid), looking at the individual parts of the field

void isValid ()

Redefinition of:
Field::isValid()
Check the validity of the current data value.
selectable (line 90)
void selectable ()

Redefinition of:
Field::selectable()
return an html representation of the widget
set (line 118)

overload the parent's value as we need to do some magic in here

void set ( $value)
  • $value

Redefinition of:
Field::set()
set the value of this field
setEditableOutput (line 188)

Set the date and time parts of the field and mark them as editable

void setEditableOutput (SimpleDate $date, SimpleTime $time)
setManualRepresentation (line 168)

pass on any flags about the representation that we should use to our members

void setManualRepresentation (integer $flag)
  • integer $flag: (TF_* types from class TimeField constants)
setSlots (line 148)

associate a TimeSlotRule for validation of the times that we are using

void setSlots (TimeSlotRule $list)
setSlotStart (line 159)

set the appropriate date that we are refering to for the timeslot rule validation

void setSlotStart (string $date)
  • string $date: passed to the TimeSlotRule
sqlSetStr (line 201)

return a SQL-injection-cleansed string that can be used in an SQL UPDATE or INSERT statement. i.e. "name='Stuart'".

  • return: in SQL assignable form
string sqlSetStr ([ $name = ''], [ $force = false])
  • $name
  • $force

Redefinition of:
Field::sqlSetStr()
create an SQL-injection-cleansed string for db statements
update (line 131)

overload the parent's update method so that local calculations can be performed

  • return: the value was updated
boolean update (array $data)
  • array $data: html_name => value pairs

Redefinition of:
Field::update()
update the value of the object with the user-supplied data in $data

Inherited Methods

Inherited From Field

Field::Field()
Field::display()
Field::displayInTable()
Field::getValue()
Field::hidden()
Field::isValid()
Field::log()
Field::selectable()
Field::selectedValue()
Field::set()
Field::setattr()
Field::setEditable()
Field::setNamebase()
Field::sqlSetStr()
Field::text_dump()
Field::update()
Field::__clone()

Documentation generated on Tue, 06 Mar 2007 10:01:15 +0000 by phpDocumentor 1.3.0