BaseHistoryTableForm.class.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * HistoryTable 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 BaseHistoryTableForm extends BaseFormPropel
  11. {
  12. public function setup()
  13. {
  14. $this->setWidgets(array(
  15. 'daytime' => new sfWidgetFormDateTime(),
  16. 'user' => new sfWidgetFormInput(),
  17. 'gid' => new sfWidgetFormInput(),
  18. 'action_id' => new sfWidgetFormPropelChoice(array('model' => 'ActionsTable', 'add_empty' => false)),
  19. 'arguments' => new sfWidgetFormTextarea(),
  20. 'return_code' => new sfWidgetFormInput(),
  21. 'id' => new sfWidgetFormInputHidden(),
  22. ));
  23. $this->setValidators(array(
  24. 'daytime' => new sfValidatorDateTime(),
  25. 'user' => new sfValidatorString(array('max_length' => 25)),
  26. 'gid' => new sfValidatorString(array('max_length' => 15)),
  27. 'action_id' => new sfValidatorPropelChoice(array('model' => 'ActionsTable', 'column' => 'id')),
  28. 'arguments' => new sfValidatorString(array('required' => false)),
  29. 'return_code' => new sfValidatorInteger(array('required' => false)),
  30. 'id' => new sfValidatorPropelChoice(array('model' => 'HistoryTable', 'column' => 'id', 'required' => false)),
  31. ));
  32. $this->widgetSchema->setNameFormat('history_table[%s]');
  33. $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
  34. parent::setup();
  35. }
  36. public function getModelName()
  37. {
  38. return 'HistoryTable';
  39. }
  40. }