Blame | Letzte Änderung | Log anzeigen | RSS feed
<?php/*** Category form base class.** @method Category getObject() Returns the current form's model object** @package ##PROJECT_NAME##* @subpackage form* @author Your name here*/abstract class BaseCategoryForm extends BaseFormPropel{public function setup(){$this->setWidgets(array('id' => new sfWidgetFormInputHidden(),'name' => new sfWidgetFormInputText(),));$this->setValidators(array('id' => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),'name' => new sfValidatorString(array('max_length' => 255, 'required' => false)),));$this->validatorSchema->setPostValidator(new sfValidatorPropelUnique(array('model' => 'Category', 'column' => array('name'))));$this->widgetSchema->setNameFormat('category[%s]');$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);parent::setup();}public function getModelName(){return 'Category';}}