Esempio n. 1
0
 public function setup()
 {
     parent::setup();
     $this->widgetSchema->setFormFormatterName('dmList');
     $this->key = 'dm_form_' . self::$counter++;
     $this->setName(dmString::underscore(get_class($this)));
 }
Esempio n. 2
0
 public function setup()
 {
     parent::setup();
     foreach ($this->getWidgetSchema()->getFields() as $name => $widget) {
         $classname = get_class($widget);
         if ($classname == 'sfWidgetFormInputText') {
             if (($val = $this->getValidator($name)) && ($len = $val->getOption('max_length'))) {
                 $widget->setAttribute('maxlength', $len);
             }
         }
     }
 }