我刚安装了库并尝试了一个带数组的简单表
$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
谢谢。
答案 0 :(得分: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;