BasePermissionsTableForm.class.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * PermissionsTable 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 BasePermissionsTableForm extends BaseFormPropel
  11. {
  12. public function setup()
  13. {
  14. $this->setWidgets(array(
  15. 'id' => new sfWidgetFormInputHidden(),
  16. 'link_id' => new sfWidgetFormPropelChoice(array('model' => 'LinksTable', 'add_empty' => false)),
  17. 'gid' => new sfWidgetFormInput(),
  18. 'mode' => new sfWidgetFormInput(),
  19. 'change_at' => new sfWidgetFormDateTime(),
  20. 'change_login' => new sfWidgetFormInput(),
  21. ));
  22. $this->setValidators(array(
  23. 'id' => new sfValidatorPropelChoice(array('model' => 'PermissionsTable', 'column' => 'id', 'required' => false)),
  24. 'link_id' => new sfValidatorPropelChoice(array('model' => 'LinksTable', 'column' => 'id')),
  25. 'gid' => new sfValidatorString(array('max_length' => 15, 'required' => false)),
  26. 'mode' => new sfValidatorString(),
  27. 'change_at' => new sfValidatorDateTime(),
  28. 'change_login' => new sfValidatorString(array('max_length' => 25)),
  29. ));
  30. $this->widgetSchema->setNameFormat('permissions_table[%s]');
  31. $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
  32. parent::setup();
  33. }
  34. public function getModelName()
  35. {
  36. return 'PermissionsTable';
  37. }
  38. }