<?php

/**
 * KataoCart form base class.
 *
 * @package    form
 * @subpackage katao_cart
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseKataoCartForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'              => new sfWidgetFormInputHidden(),
      'katao_user_id'   => new sfWidgetFormPropelSelect(array('model' => 'KataoUser', 'add_empty' => false)),
      'katao_period_id' => new sfWidgetFormPropelSelect(array('model' => 'KataoPeriod', 'add_empty' => false)),
      'katao_node_id'   => new sfWidgetFormPropelSelect(array('model' => 'KataoNode', 'add_empty' => false)),
      'status'          => new sfWidgetFormInput(),
      'created_at'      => new sfWidgetFormDateTime(),
      'updated_at'      => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'              => new sfValidatorPropelChoice(array('model' => 'KataoCart', 'column' => 'id', 'required' => false)),
      'katao_user_id'   => new sfValidatorPropelChoice(array('model' => 'KataoUser', 'column' => 'id')),
      'katao_period_id' => new sfValidatorPropelChoice(array('model' => 'KataoPeriod', 'column' => 'id')),
      'katao_node_id'   => new sfValidatorPropelChoice(array('model' => 'KataoNode', 'column' => 'id')),
      'status'          => new sfValidatorInteger(),
      'created_at'      => new sfValidatorDateTime(array('required' => false)),
      'updated_at'      => new sfValidatorDateTime(array('required' => false)),
    ));

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

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

    parent::setup();
  }

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


}
