<?php

/**
 * KataoNodeSupplier form base class.
 *
 * @package    form
 * @subpackage katao_node_supplier
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseKataoNodeSupplierForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                   => new sfWidgetFormInputHidden(),
      'katao_node_id'        => new sfWidgetFormPropelSelect(array('model' => 'KataoNode', 'add_empty' => false)),
      'katao_period_id'      => new sfWidgetFormPropelSelect(array('model' => 'KataoPeriod', 'add_empty' => false)),
      'katao_supplier_id'    => new sfWidgetFormPropelSelect(array('model' => 'KataoSupplier', 'add_empty' => false)),
      'include_all_products' => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'                   => new sfValidatorPropelChoice(array('model' => 'KataoNodeSupplier', 'column' => 'id', 'required' => false)),
      'katao_node_id'        => new sfValidatorPropelChoice(array('model' => 'KataoNode', 'column' => 'id')),
      'katao_period_id'      => new sfValidatorPropelChoice(array('model' => 'KataoPeriod', 'column' => 'id')),
      'katao_supplier_id'    => new sfValidatorPropelChoice(array('model' => 'KataoSupplier', 'column' => 'id')),
      'include_all_products' => new sfValidatorInteger(),
    ));

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

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

    parent::setup();
  }

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


}
