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

Revision 48, 2.2 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  * ApplicationCompany form base class.
5  *
6  * @package    form
7  * @subpackage application_company
8  * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
9  */
10 class BaseApplicationCompanyForm extends BaseFormPropel
11 {
12   public function setup()
13   {
14     $this->setWidgets(array(
15       'id'             => new sfWidgetFormInputHidden(),
16       'company_id'     => new sfWidgetFormPropelSelect(array('model' => 'Company', 'add_empty' => false)),
17       'application_id' => new sfWidgetFormPropelSelect(array('model' => 'Application', 'add_empty' => false)),
18       'submitter_id'   => new sfWidgetFormPropelSelect(array('model' => 'sfGuardUser', 'add_empty' => false)),
19       'role'           => new sfWidgetFormInput(),
20       'description'    => new sfWidgetFormTextarea(),
21       'started_at'     => new sfWidgetFormDateTime(),
22       'ended_at'       => new sfWidgetFormDateTime(),
23       'created_at'     => new sfWidgetFormDateTime(),
24       'updated_at'     => new sfWidgetFormDateTime(),
25     ));
26
27     $this->setValidators(array(
28       'id'             => new sfValidatorPropelChoice(array('model' => 'ApplicationCompany', 'column' => 'id', 'required' => false)),
29       'company_id'     => new sfValidatorPropelChoice(array('model' => 'Company', 'column' => 'id')),
30       'application_id' => new sfValidatorPropelChoice(array('model' => 'Application', 'column' => 'id')),
31       'submitter_id'   => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id')),
32       'role'           => new sfValidatorString(array('max_length' => 255, 'required' => false)),
33       'description'    => new sfValidatorString(array('required' => false)),
34       'started_at'     => new sfValidatorDateTime(array('required' => false)),
35       'ended_at'       => new sfValidatorDateTime(array('required' => false)),
36       'created_at'     => new sfValidatorDateTime(array('required' => false)),
37       'updated_at'     => new sfValidatorDateTime(array('required' => false)),
38     ));
39
40     $this->widgetSchema->setNameFormat('application_company[%s]');
41
42     $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
43
44     parent::setup();
45   }
46
47   public function getModelName()
48   {
49     return 'ApplicationCompany';
50   }
51
52
53 }
54
Note: See TracBrowser for help on using the browser.