php BillOperation form base class package form subpackage bill_operati

 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
<?php
/**
* BillOperation form base class.
*
* @package form
* @subpackage bill_operation
* @version SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
*/
class BaseBillOperationForm extends BaseFormPropel
{
public function setup()
{
$this->setWidgets(array(
'id' => new sfWidgetFormInputHidden(),
'name' => new sfWidgetFormInput(),
'description' => new sfWidgetFormInput(),
));
$this->setValidators(array(
'id' => new sfValidatorPropelChoice(array('model' => 'BillOperation', 'column' => 'id', 'required' => false)),
'name' => new sfValidatorString(array('max_length' => 255)),
'description' => new sfValidatorString(array('max_length' => 255)),
));
$this->validatorSchema->setPostValidator(
new sfValidatorPropelUnique(array('model' => 'BillOperation', 'column' => array('name')))
);
$this->widgetSchema->setNameFormat('bill_operation[%s]');
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
parent::setup();
}
public function getModelName()
{
return 'BillOperation';
}
}