protected function setupInheritance() { parent::setupInheritance(); $this->widgetSchema['username'] = new sfWidgetFormFilterInput(array('with_empty' => false)); $this->validatorSchema['username'] = new sfValidatorPass(array('required' => false)); $this->widgetSchema['algorithm'] = new sfWidgetFormFilterInput(array('with_empty' => false)); $this->validatorSchema['algorithm'] = new sfValidatorPass(array('required' => false)); $this->widgetSchema['salt'] = new sfWidgetFormFilterInput(); $this->validatorSchema['salt'] = new sfValidatorPass(array('required' => false)); $this->widgetSchema['password'] = new sfWidgetFormFilterInput(); $this->validatorSchema['password'] = new sfValidatorPass(array('required' => false)); $this->widgetSchema['email_address'] = new sfWidgetFormFilterInput(array('with_empty' => false)); $this->validatorSchema['email_address'] = new sfValidatorPass(array('required' => false)); $this->widgetSchema['is_active'] = new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))); $this->validatorSchema['is_active'] = new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))); $this->widgetSchema['is_super_admin'] = new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))); $this->validatorSchema['is_super_admin'] = new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))); $this->widgetSchema['last_login'] = new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())); $this->validatorSchema['last_login'] = new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))); $this->widgetSchema['created_at'] = new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)); $this->validatorSchema['created_at'] = new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))); $this->widgetSchema['updated_at'] = new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)); $this->validatorSchema['updated_at'] = new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))); $this->widgetSchema['groups_list'] = new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardGroup')); $this->validatorSchema['groups_list'] = new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardGroup', 'required' => false)); $this->widgetSchema['permissions_list'] = new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardPermission')); $this->validatorSchema['permissions_list'] = new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardPermission', 'required' => false)); $this->widgetSchema->setNameFormat('sf_guard_user_filters[%s]'); }
protected function setupInheritance() { parent::setupInheritance(); $this->widgetSchema['cedula'] = new sfWidgetFormFilterInput(array('with_empty' => false)); $this->validatorSchema['cedula'] = new sfValidatorPass(array('required' => false)); $this->widgetSchema['licencia'] = new sfWidgetFormFilterInput(); $this->validatorSchema['licencia'] = new sfValidatorPass(array('required' => false)); $this->widgetSchema->setNameFormat('propietario_filters[%s]'); }
protected function setupInheritance() { parent::setupInheritance(); $this->widgetSchema->setNameFormat('cliente_filters[%s]'); }