<?php

require_once(sfConfig::get('sf_lib_dir').'/filter/doctrine/BaseFormFilterDoctrine.class.php');

/**
 * ThdTag filter form base class.
 *
 * @package    filters
 * @subpackage ThdTag *
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 11675 2008-09-19 15:21:38Z fabien $
 */
class BaseThdTagFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'tag'      => new sfWidgetFormFilterInput(),
      'uniqueid' => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'tag'      => new sfValidatorPass(array('required' => false)),
      'uniqueid' => new sfValidatorPass(array('required' => false)),
    ));

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

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

    parent::setup();
  }

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

  public function getFields()
  {
    return array(
      'id'       => 'Number',
      'tag'      => 'Text',
      'uniqueid' => 'Text',
    );
  }
}