<?php

/**
 * PerfilesCredenciales form base class.
 *
 * @package    form
 * @subpackage perfiles_credenciales
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BasePerfilesCredencialesForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_perfil'     => new sfWidgetFormInputHidden(),
      'id_credencial' => new sfWidgetFormInputHidden(),
      'username'      => new sfWidgetFormInput(),
      'created_at'    => new sfWidgetFormDate(),
      'update_at'     => new sfWidgetFormDate(),
      'estado'        => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id_perfil'     => new sfValidatorPropelChoice(array('model' => 'Perfiles', 'column' => 'id', 'required' => false)),
      'id_credencial' => new sfValidatorPropelChoice(array('model' => 'Credenciales', 'column' => 'id', 'required' => false)),
      'username'      => new sfValidatorNumber(array('required' => false)),
      'created_at'    => new sfValidatorDate(array('required' => false)),
      'update_at'     => new sfValidatorDate(array('required' => false)),
      'estado'        => new sfValidatorNumber(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('perfiles_credenciales[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'PerfilesCredenciales';
  }


}
