Répertoire de codes source
Zend Framework DataGrid | |
---|---|
déposé par zsamer le 03/10/2008 nombre de visites : 7550 edité le 03/10/2008 par zsamer |
Zend Framework DataGrid is a project / component written in PHP5, specially developed to work with Zend Framework, aims to generate grids or list from a Data Source such Zend_Db_Table, Zend_Db_Select, Zend_Db_Adapter, Propel, Array, and so on. With features like sort columns (sort / order by), pagination and an appropriate render depending on the type of column. The project link : http://code.google.com/p/zend-framework-datagrid/ |
<?php require 'cms/models/Project.php'; class Cms_GridController extends Zend_Controller_Action { public function init() { $this->view->baseUrl = $this->_request->getBaseUrl(); $this->view->addScriptPath(Core::getBaseDir() . DIRECTORY_SEPARATOR . 'skins/scripts/datagrid/'); } public function testAction() { $grid = new Core_DataGrid(new Core_DataGrid_DataSource_Table(new Project()), 5); $grid->setDefaultSort('title') ->setDefaultDir("asc"); $this->view->grid = $grid; } } |
|