<?php

/**
 * Areas form base class.
 *
 * @package    form
 * @subpackage areas
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseAreasForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_area'        => new sfWidgetFormInputHidden(),
      'descripcion'    => new sfWidgetFormInput(),
      'sigla'          => new sfWidgetFormInput(),
      'id_dependencia' => new sfWidgetFormInput(),
      'codigo'         => new sfWidgetFormInput(),
      'id_nivel'       => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id_area'        => new sfValidatorPropelChoice(array('model' => 'Areas', 'column' => 'id_area', 'required' => false)),
      'descripcion'    => new sfValidatorString(array('max_length' => 1000, 'required' => false)),
      'sigla'          => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'id_dependencia' => new sfValidatorNumber(array('required' => false)),
      'codigo'         => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'id_nivel'       => new sfValidatorNumber(array('required' => false)),
    ));

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

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

    parent::setup();
  }

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


}
