equal
deleted
inserted
replaced
1 <?php |
|
2 |
|
3 /** |
|
4 * ThdImage form base class. |
|
5 * |
|
6 * @package form |
|
7 * @subpackage thd_image |
|
8 * @version SVN: $Id: sfDoctrineFormGeneratedTemplate.php 8508 2008-04-17 17:39:15Z fabien $ |
|
9 */ |
|
10 class BaseThdImageForm extends BaseFormDoctrine |
|
11 { |
|
12 public function setup() |
|
13 { |
|
14 $this->setWidgets(array( |
|
15 'id' => new sfWidgetFormInputHidden(), |
|
16 'film_ref' => new sfWidgetFormDoctrineChoice(array('model' => 'ThdFilm', 'add_empty' => false)), |
|
17 'type' => new sfWidgetFormInput(), |
|
18 'file' => new sfWidgetFormInput(), |
|
19 )); |
|
20 |
|
21 $this->setValidators(array( |
|
22 'id' => new sfValidatorDoctrineChoice(array('model' => 'ThdImage', 'column' => 'id', 'required' => false)), |
|
23 'film_ref' => new sfValidatorDoctrineChoice(array('model' => 'ThdFilm')), |
|
24 'type' => new sfValidatorInteger(), |
|
25 'file' => new sfValidatorString(array('max_length' => 255)), |
|
26 )); |
|
27 |
|
28 $this->widgetSchema->setNameFormat('thd_image[%s]'); |
|
29 |
|
30 $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); |
|
31 |
|
32 parent::setup(); |
|
33 } |
|
34 |
|
35 public function getModelName() |
|
36 { |
|
37 return 'ThdImage'; |
|
38 } |
|
39 |
|
40 } |
|