1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| <?php
/**
* TSoudure form base class.
*
* @method TSoudure getObject() Returns the current form's model object
*
* @package monProjet
* @subpackage form
* @author Your name here
* @version SVN: $Id: sfDoctrineFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
*/
abstract class BaseTSoudureForm extends BaseFormDoctrine
{
public function setup()
{
$this->setWidgets(array(
'numsoudure' => new sfWidgetFormInputHidden(),
/*'tmedaille_nummedaille' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('TMedaille'), 'add_empty' => false)),*/
'tmedaille_nummedaille' => new sfWidgetFormInputText(),
'numordre' => new sfWidgetFormInputText(),
/*'distpreforgeage' => new sfWidgetFormInputText(),
'distrefoulement' => new sfWidgetFormInputText(),
'presscontact' => new sfWidgetFormInputText(),
'pressrefoulement' => new sfWidgetFormInputText(),
'tpschauffe' => new sfWidgetFormInputText(),
'tpsforgeage' => new sfWidgetFormInputText(),
'iscoupon' => new sfWidgetFormInputText(),
'numcoupon' => new sfWidgetFormInputText(),*/
'cb_gauche' => new sfWidgetFormInputText(),
'cb_droite' => new sfWidgetFormInputText(),
));
$this->setValidators(array(
'numsoudure' => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'numsoudure', 'required' => false)),
/*'tmedaille_nummedaille' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('TMedaille'))),*/
'tmedaille_nummedaille' => new sfValidatorInteger(),
'numordre' => new sfValidatorInteger(),
/*'distpreforgeage' => new sfValidatorInteger(),
'distrefoulement' => new sfValidatorInteger(),
'presscontact' => new sfValidatorInteger(),
'pressrefoulement' => new sfValidatorInteger(),
'tpschauffe' => new sfValidatorInteger(),
'tpsforgeage' => new sfValidatorInteger(),
'iscoupon' => new sfValidatorInteger(array('required' => false)),
'numcoupon' => new sfValidatorInteger(array('required' => false)),*/
'cb_gauche' => new sfValidatorString(array('max_length' => 16, 'required' => false)),
'cb_droite' => new sfValidatorString(array('max_length' => 16, 'required' => false)),
));
...
}
} |
Partager