1

_toString()メソッドを使用してフォームにテンプレートをレンダリングしようとしています。私が直面している問題は、フォームがコントローラーから継承されず、 $str.= $this->renderPartial('template',array('form' => $this)); を実行できないことです。これはどのように達成できますか?

PHP 5.3でsymfony 1.4を使用しています

4

2 に答える 2

0

このRender a partial from a task in Symfony 1.4と 1.4 doc http://www.symfony-project.org/api/1_4/PartialHelperを使用して OK

やった

sfContext::getInstance()->getConfiguration()->loadHelpers('Partial');

__toString() で

get_partial('template',array('form' => $this));

それ以外の

$this->renderPartial('template',array('form' => $this));
于 2013-05-07T08:53:19.137 に答える