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

Revision 48, 1.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  * Activation form base class.
5  *
6  * @package    form
7  * @subpackage activation
8  * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
9  */
10 class BaseActivationForm extends BaseFormPropel
11 {
12   public function setup()
13   {
14     $this->setWidgets(array(
15       'id'      => new sfWidgetFormInputHidden(),
16       'user_id' => new sfWidgetFormPropelSelect(array('model' => 'sfGuardUser', 'add_empty' => false)),
17       'hash'    => new sfWidgetFormInput(),
18     ));
19
20     $this->setValidators(array(
21       'id'      => new sfValidatorPropelChoice(array('model' => 'Activation', 'column' => 'id', 'required' => false)),
22       'user_id' => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id')),
23       'hash'    => new sfValidatorString(array('max_length' => 32)),
24     ));
25
26     $this->widgetSchema->setNameFormat('activation[%s]');
27
28     $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
29
30     parent::setup();
31   }
32
33   public function getModelName()
34   {
35     return 'Activation';
36   }
37
38
39 }
40
Note: See TracBrowser for help on using the browser.