setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'node_id' => new sfWidgetFormPropelSelect(array('model' => 'Node', 'add_empty' => true)), 'introduction' => new sfWidgetFormTextarea(), )); $this->setValidators(array( 'id' => new sfValidatorPropelChoice(array('model' => 'NodeNetwork', 'column' => 'id', 'required' => false)), 'node_id' => new sfValidatorPropelChoice(array('model' => 'Node', 'column' => 'id', 'required' => false)), 'introduction' => new sfValidatorString(array('required' => false)), )); $this->widgetSchema->setNameFormat('node_network[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); parent::setup(); } public function getModelName() { return 'NodeNetwork'; } }