ここの情報は古いです。ご理解頂いた上でお取り扱いください。

source: OpenPNE3/branches/goto_doctrine/lib/form/doctrine/base/BaseMemberImageForm.class.php @ 11219

Last change on this file since 11219 was 11219, checked in by ebihara, 13 years ago

#3765:imported new models for Doctrine from some old models for Propel to enable to login

File size: 1.2 KB
Line 
1<?php
2
3/**
4 * MemberImage form base class.
5 *
6 * @package    form
7 * @subpackage member_image
8 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 8508 2008-04-17 17:39:15Z fabien $
9 */
10class BaseMemberImageForm extends BaseFormDoctrine
11{
12  public function setup()
13  {
14    $this->setWidgets(array(
15      'id'         => new sfWidgetFormInputHidden(),
16      'member_id'  => new sfWidgetFormDoctrineChoice(array('model' => 'Member', 'add_empty' => false)),
17      'file_id'    => new sfWidgetFormDoctrineChoice(array('model' => 'File', 'add_empty' => false)),
18      'is_primary' => new sfWidgetFormInput(),
19    ));
20
21    $this->setValidators(array(
22      'id'         => new sfValidatorDoctrineChoice(array('model' => 'MemberImage', 'column' => 'id', 'required' => false)),
23      'member_id'  => new sfValidatorDoctrineChoice(array('model' => 'Member')),
24      'file_id'    => new sfValidatorDoctrineChoice(array('model' => 'File')),
25      'is_primary' => new sfValidatorInteger(array('required' => false)),
26    ));
27
28    $this->widgetSchema->setNameFormat('member_image[%s]');
29
30    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
31
32    parent::setup();
33  }
34
35  public function getModelName()
36  {
37    return 'MemberImage';
38  }
39
40}
Note: See TracBrowser for help on using the repository browser.