<?php

/**
 * ReviewTags form base class.
 *
 * @method ReviewTags getObject() Returns the current form's model object
 *
 * @package    sf
 * @subpackage form
 * @author     Atma
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseReviewTagsForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'review_id' => new sfWidgetFormInputHidden(array(), array()),
      'tag_id'    => new sfWidgetFormInputHidden(array(), array()),
    ));

    $this->setValidators(array(
      'review_id' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'review_id', 'required' => false)),
      'tag_id'    => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'tag_id', 'required' => false)),
    ));

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

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

    $this->setupInheritance();

    parent::setup();
  }

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

}
