00001 <?php
00008 class DateTimeField extends CollectionField
00009 {
00016 public function __construct($name, Form &$parentForm, array $attribs = array('mode' => 12))
00017 {
00018 $attribs['fields'] = array(
00019 array('DateField', "${name}_date", $attribs),
00020 array('TimeField', "${name}_time", $attribs)
00021 );
00022
00023 parent::__construct($name, $parentForm, $attribs);
00024 }
00025
00030 public function setData($value)
00031 {
00032 $this->fields[0]->setData($value);
00033 $this->fields[1]->setData($value);
00034 }
00035
00040 public function getData()
00041 {
00042 return $this->fields[0]->getData() . ' ' . $this->fields[1]->getData();
00043 }
00044
00049 public function getSqlImpl()
00050 {
00051 return $this->name . '=\'' . $this->getData() . '\'';
00052 }
00053 }
00054 ?>