| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
class BaseApplicationDeveloperForm extends BaseFormPropel |
|---|
| 11 |
{ |
|---|
| 12 |
public function setup() |
|---|
| 13 |
{ |
|---|
| 14 |
$this->setWidgets(array( |
|---|
| 15 |
'id' => new sfWidgetFormInputHidden(), |
|---|
| 16 |
'developer_id' => new sfWidgetFormPropelSelect(array('model' => 'sfGuardUser', 'add_empty' => false)), |
|---|
| 17 |
'application_id' => new sfWidgetFormPropelSelect(array('model' => 'Application', 'add_empty' => false)), |
|---|
| 18 |
'role' => new sfWidgetFormInput(), |
|---|
| 19 |
'description' => new sfWidgetFormTextarea(), |
|---|
| 20 |
'started_at' => new sfWidgetFormDateTime(), |
|---|
| 21 |
'ended_at' => new sfWidgetFormDateTime(), |
|---|
| 22 |
'created_at' => new sfWidgetFormDateTime(), |
|---|
| 23 |
'updated_at' => new sfWidgetFormDateTime(), |
|---|
| 24 |
)); |
|---|
| 25 |
|
|---|
| 26 |
$this->setValidators(array( |
|---|
| 27 |
'id' => new sfValidatorPropelChoice(array('model' => 'ApplicationDeveloper', 'column' => 'id', 'required' => false)), |
|---|
| 28 |
'developer_id' => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id')), |
|---|
| 29 |
'application_id' => new sfValidatorPropelChoice(array('model' => 'Application', 'column' => 'id')), |
|---|
| 30 |
'role' => new sfValidatorString(array('max_length' => 255, 'required' => false)), |
|---|
| 31 |
'description' => new sfValidatorString(array('required' => false)), |
|---|
| 32 |
'started_at' => new sfValidatorDateTime(array('required' => false)), |
|---|
| 33 |
'ended_at' => new sfValidatorDateTime(array('required' => false)), |
|---|
| 34 |
'created_at' => new sfValidatorDateTime(array('required' => false)), |
|---|
| 35 |
'updated_at' => new sfValidatorDateTime(array('required' => false)), |
|---|
| 36 |
)); |
|---|
| 37 |
|
|---|
| 38 |
$this->widgetSchema->setNameFormat('application_developer[%s]'); |
|---|
| 39 |
|
|---|
| 40 |
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); |
|---|
| 41 |
|
|---|
| 42 |
parent::setup(); |
|---|
| 43 |
} |
|---|
| 44 |
|
|---|
| 45 |
public function getModelName() |
|---|
| 46 |
{ |
|---|
| 47 |
return 'ApplicationDeveloper'; |
|---|
| 48 |
} |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
} |
|---|
| 52 |
|
|---|