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

source: OpenPNE3/branches/goto_doctrine/lib/form/doctrine/base/BaseCommunityMemberForm.class.php @ 11208

Last change on this file since 11208 was 11208, checked in by ebihara, 14 years ago

#3765:removed propel-generated model files, setted doctrine's schema file and build doctrine model files

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