<?php

/**
 * KataoProductFamily form base class.
 *
 * @package    form
 * @subpackage katao_product_family
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseKataoProductFamilyForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                        => new sfWidgetFormInputHidden(),
      'katao_product_category_id' => new sfWidgetFormPropelSelect(array('model' => 'KataoProductCategory', 'add_empty' => false)),
      'name'                      => new sfWidgetFormInput(),
      'url_identifier'            => new sfWidgetFormInput(),
      'created_at'                => new sfWidgetFormDateTime(),
      'updated_at'                => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                        => new sfValidatorPropelChoice(array('model' => 'KataoProductFamily', 'column' => 'id', 'required' => false)),
      'katao_product_category_id' => new sfValidatorPropelChoice(array('model' => 'KataoProductCategory', 'column' => 'id')),
      'name'                      => new sfValidatorString(array('max_length' => 255)),
      'url_identifier'            => new sfValidatorString(array('max_length' => 255)),
      'created_at'                => new sfValidatorDateTime(array('required' => false)),
      'updated_at'                => new sfValidatorDateTime(array('required' => false)),
    ));

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

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

    parent::setup();
  }

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


}
