root/trunk/lib/form/base/BaseApplicationDeveloperForm.class.php

Revision 48, 2.0 kB (checked in by nperriault, 8 months ago)

Upgraded scripts to use symfony 1.1, everything is broken, use with caution.

Line 
1 <?php
2
3 /**
4  * ApplicationDeveloper form base class.
5  *
6  * @package    form
7  * @subpackage application_developer
8  * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
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
Note: See TracBrowser for help on using the browser.