0

我刚刚安装了库并尝试了一个带有数组的简单表

$grid = Bvb_Grid::factory("Bvb_Grid_Deploy_Table");
$grid->setSource(new Bvb_Grid_Source_Array($this->pkg));
$myGrid = $grid->deploy();

我收到此错误:

Plugin by name 'Table' was not found in the registry; used paths: Bvb_Grid_Template_: Bvb/Grid/Template/

我不熟悉它是如何工作的,但会猜测它在Bvb/Grid/Template/目录中查看的错误,Table.php类中有一个Bvb_Grid_Template_Table。谢谢。

4

1 回答 1

0

尝试一点不同。写“表”而不是“Bvb_Grid_Deploy_Table”。在我的示例中,还有网格配置文件...

$config = new Zend_Config_Ini(dirname(__FILE__) . '/../configs/grid.ini','clients');
$grid = Bvb_Grid::factory('Table', $config);
$model = new Sand_Model_DbTable_Asset();
$source = new Bvb_Grid_Source_Zend_Table($model);
$grid->setSource($source);
/*
   more code here...
*/
$myGrid = $grid->deploy();
$this->view->grid = $myGrid;
于 2012-11-04T17:08:50.480 回答