Exemplo n.º 1
0
 /**
  * 
  */
 public function makeTPassword($properties)
 {
     $widget = new TPassword((string) $properties->{'name'});
     $widget->setValue((string) $properties->{'value'});
     $widget->setSize((int) $properties->{'width'});
     $widget->setEditable((string) $properties->{'editable'});
     if (isset($properties->{'tip'})) {
         $widget->setTip((string) $properties->{'tip'});
     }
     if (isset($properties->{'required'}) and $properties->{'required'} == '1') {
         $widget->addValidation((string) $properties->{'name'}, new TRequiredValidator());
     }
     $this->fields[] = $widget;
     $this->fieldsByName[(string) $properties->{'name'}] = $widget;
     return $widget;
 }