【发布时间】:2012-09-05 11:10:54
【问题描述】:
我想在 CGridView 的单元格中呈现一个 php 视图文件。
所以我写了这段代码:
$this->widget('zii.widgets.grid.CGridView', array(
'dataProvider'=>$dataProvider,
'columns'=>array(
array(
'value'=>array($this, 'renderPartial("_lineProblems")')
))));
但我收到此错误:
BookController and its behaviors do not have a method or closure named "renderPartial('_lineProblems' )".
堆栈跟踪显示这是问题:
call_user_func_array(array(BookController, "renderPartial('_lineProblems' )"), array("data" => line, "row" => 0, 0 => CDataColumn))
我不明白这个错误。 $this 是 BookController 的实例,而 BookController 是 CController 的子节点。
【问题讨论】: