✏️ 编辑:ProfileOptionForm.class.php
路径:
/virtual/bigbrother/sns/lib/form/ProfileOptionForm.class.php
大小:1.45 KB · 修改:2010-08-10 13:59:42 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php /** * This file is part of the OpenPNE package. * (c) OpenPNE Project (http://www.openpne.jp/) * * For the full copyright and license information, please view the LICENSE * file and the NOTICE file that were distributed with this source code. */ /** * ProfileOption form. * * @package form * @subpackage profile_option * @version SVN: $Id: sfPropelFormTemplate.php 6174 2007-11-27 06:22:40Z fabien $ */ class ProfileOptionForm extends BaseProfileOptionForm { public function configure() { $options = array(); if ($this->object && $this->object->getId()) { $options['id_format'] = '%s' . $this->object->getId(); } $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'profile_id' => new sfWidgetFormInputHidden(), 'sort_order' => new sfWidgetFormInputHidden(), )); $this->setValidators(array( 'id' => new sfValidatorPropelChoice(array('model' => 'ProfileOption', 'column' => 'id', 'required' => false)), 'profile_id' => new sfValidatorPropelChoice(array('model' => 'Profile', 'column' => 'id', 'required' => true)), 'sort_order' => new sfValidatorInteger(array('required' => false)), )); $this->widgetSchema->setNameFormat('profile_option[%s]'); $this->embedI18n(array('ja_JP')); } public function updateObject() { if (!$this->isNew()) { unset($this->values['sort_order']); } return parent::updateObject(); } }
💾 保存
取消
保存为 UTF-8,换行统一为 LF