<?php

/**
 * KataoPeriodProduct form base class.
 *
 * @package    form
 * @subpackage katao_period_product
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseKataoPeriodProductForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'               => new sfWidgetFormInputHidden(),
      'katao_period_id'  => new sfWidgetFormPropelSelect(array('model' => 'KataoPeriod', 'add_empty' => false)),
      'katao_product_id' => new sfWidgetFormPropelSelect(array('model' => 'KataoProduct', 'add_empty' => false)),
    ));

    $this->setValidators(array(
      'id'               => new sfValidatorPropelChoice(array('model' => 'KataoPeriodProduct', 'column' => 'id', 'required' => false)),
      'katao_period_id'  => new sfValidatorPropelChoice(array('model' => 'KataoPeriod', 'column' => 'id')),
      'katao_product_id' => new sfValidatorPropelChoice(array('model' => 'KataoProduct', 'column' => 'id')),
    ));

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

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

    parent::setup();
  }

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


}
