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