public function test(){
$data = ORM::factory('testdata')->find_all();
Table::factory()
->set_body_data($data)
->set_row_titles('id')
->set_column_titles(Table::AUTO)
->set_callback('format_row', 'row')
->render(true);
$this->template->title = '';
$this->template->payment_content = '';
}
function format_row($row, $index){
if ($index % 2 == 0) return new Tr('', 'zebra');
}
//得到一个错误:回调函数format_row不存在!在控制器类(Payment_Controller)回调在MVC
我该怎么办回调在MVC声明两种方法?
您能否更详细地描述问题 - 并更准确地说明错误? – arbales 2009-10-30 05:58:10
只是增加了一个额外的评论...希望可以帮助 – yretuta 2009-10-30 06:06:14