BasePrintingsTableForm.class.php 1.2 KB

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