BaseKataoProductFamilyForm.class.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * KataoProductFamily form base class.
  4. *
  5. * @package form
  6. * @subpackage katao_product_family
  7. * @version SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
  8. */
  9. class BaseKataoProductFamilyForm extends BaseFormPropel
  10. {
  11. public function setup()
  12. {
  13. $this->setWidgets(array(
  14. 'id' => new sfWidgetFormInputHidden(),
  15. 'katao_product_category_id' => new sfWidgetFormPropelSelect(array('model' => 'KataoProductCategory', 'add_empty' => false)),
  16. 'name' => new sfWidgetFormInput(),
  17. 'url_identifier' => new sfWidgetFormInput(),
  18. 'created_at' => new sfWidgetFormDateTime(),
  19. 'updated_at' => new sfWidgetFormDateTime(),
  20. ));
  21. $this->setValidators(array(
  22. 'id' => new sfValidatorPropelChoice(array('model' => 'KataoProductFamily', 'column' => 'id', 'required' => false)),
  23. 'katao_product_category_id' => new sfValidatorPropelChoice(array('model' => 'KataoProductCategory', 'column' => 'id')),
  24. 'name' => new sfValidatorString(array('max_length' => 255)),
  25. 'url_identifier' => new sfValidatorString(array('max_length' => 255)),
  26. 'created_at' => new sfValidatorDateTime(array('required' => false)),
  27. 'updated_at' => new sfValidatorDateTime(array('required' => false)),
  28. ));
  29. $this->widgetSchema->setNameFormat('katao_product_family[%s]');
  30. $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
  31. parent::setup();
  32. }
  33. public function getModelName()
  34. {
  35. return 'KataoProductFamily';
  36. }
  37. }