BaseCategoryTableForm.class.php 892 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * CategoryTable form base class.
  4. *
  5. * @package usic
  6. * @subpackage form
  7. * @author Your name here
  8. * @version SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
  9. */
  10. class BaseCategoryTableForm extends BaseFormPropel
  11. {
  12. public function setup()
  13. {
  14. $this->setWidgets(array(
  15. 'id' => new sfWidgetFormInputHidden(),
  16. 'name' => new sfWidgetFormInput(),
  17. ));
  18. $this->setValidators(array(
  19. 'id' => new sfValidatorPropelChoice(array('model' => 'CategoryTable', 'column' => 'id', 'required' => false)),
  20. 'name' => new sfValidatorString(array('max_length' => 25)),
  21. ));
  22. $this->widgetSchema->setNameFormat('category_table[%s]');
  23. $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
  24. parent::setup();
  25. }
  26. public function getModelName()
  27. {
  28. return 'CategoryTable';
  29. }
  30. }