BaseNightloadTableForm.class.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * NightloadTable 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 BaseNightloadTableForm extends BaseFormPropel
  11. {
  12. public function setup()
  13. {
  14. $this->setWidgets(array(
  15. 'id' => new sfWidgetFormInputHidden(),
  16. 'user' => new sfWidgetFormInput(),
  17. 'begin' => new sfWidgetFormDateTime(),
  18. 'finish' => new sfWidgetFormDateTime(),
  19. 'state' => new sfWidgetFormInput(),
  20. 'url' => new sfWidgetFormTextarea(),
  21. 'protocol' => new sfWidgetFormInput(),
  22. 'path' => new sfWidgetFormTextarea(),
  23. ));
  24. $this->setValidators(array(
  25. 'id' => new sfValidatorPropelChoice(array('model' => 'NightloadTable', 'column' => 'id', 'required' => false)),
  26. 'user' => new sfValidatorString(array('max_length' => 25)),
  27. 'begin' => new sfValidatorDateTime(),
  28. 'finish' => new sfValidatorDateTime(),
  29. 'state' => new sfValidatorString(array('max_length' => 15)),
  30. 'url' => new sfValidatorString(),
  31. 'protocol' => new sfValidatorString(array('max_length' => 10, 'required' => false)),
  32. 'path' => new sfValidatorString(),
  33. ));
  34. $this->widgetSchema->setNameFormat('nightload_table[%s]');
  35. $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
  36. parent::setup();
  37. }
  38. public function getModelName()
  39. {
  40. return 'NightloadTable';
  41. }
  42. }