<?php

/**
 * ReviewTranslation filter form base class.
 *
 * @package    sf
 * @subpackage filter
 * @author     Atma
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseReviewTranslationFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'available' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'body'      => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'available' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'body'      => new sfValidatorPass(array('required' => false)),
    ));

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

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

    $this->setupInheritance();

    parent::setup();
  }

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

  public function getFields()
  {
    return array(
      'id'        => 'Number',
      'available' => 'Boolean',
      'body'      => 'Text',
      'lang'      => 'Text',
    );
  }
}
