public function setName($name)
 {
     parent::setName($name);
     $this->dateField->setName($name . '[date]');
     $this->timeField->setName($name . '[time]');
     $this->timezoneField->setName($name . '[timezone]');
     return $this;
 }
 /**
  * Update the names of the child fields when updating name of field.
  *
  * @param string $name new name to give to the field.
  * @return $this
  */
 public function setName($name)
 {
     $this->passwordField->setName($name . '[_Password]');
     $this->confirmPasswordfield->setName($name . '[_ConfirmPassword]');
     if ($this->hiddenField) {
         $this->hiddenField->setName($name . '[_PasswordFieldVisible]');
     }
     parent::setName($name);
     return $this;
 }
 public function testGetSchemaData()
 {
     $field = new FormField('MyField');
     $schema = $field->getSchemaData();
     $this->assertEquals('MyField', $schema['name']);
     // Make sure the schema data is up-to-date with object properties.
     $field->setName('UpdatedField');
     $schema = $field->getSchemaData();
     $this->assertEquals($field->getName(), $schema['name']);
 }