00001 <?php
00008 class NameField extends CollectionField
00009 {
00016 public function __construct($name, Form &$parentForm, array $attribs = array())
00017 {
00018
00019 $attribs['fields'] = array(
00020 array('TextField', "first_${name}", array_merge($attribs, array('size' => '20', 'maxlength' => '128'))),
00021 array('TextField', "last_${name}", array_merge($attribs, array('size' => '20', 'maxlength' => '128')))
00022 );
00023
00024
00025 parent::__construct($name, $parentForm, $attribs);
00026 }
00027
00032 public function getSqlImpl()
00033 {
00034 return "$this->name = '" . implode(" ", $this->getData()) . "'";
00035 }
00036
00037 }
00038 ?>