<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
Zend_Grid is a component for display/manage data with source abstraction.Zend Framework: Zend_Grid Component Proposal
Proposed Component Name
Zend_Grid
Developer Notes
http://framework.zend.com/wiki/display/ZFDEV/Zend_Grid
Proposers
Bento Vilas Boas
Zend Liaison
TBD
Revision
1.0 - 26 June 2010: Initial Draft. (wiki revision: 2)
Table of Contents
1. Overview
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
Must Support:
- Multiples sources
- CRUD operations with bulk add/edit/remove options and auto-validation from tables definition
- PRG Form Processing
- Templates
- Multiples renders (Table, PDF, Print, Xml, Excel, etc, etc)
- Extra columns
- Extra rows
- Aggregate Expressions
- Horizontal splitting of records
- Multiple instances per page
- Custom Filters
- Auto-filters based on field definition (enum, set, etc, etc)
- Mass actions
- Cache
- Content format plugins
- Ajax
- Conditional Field Rendering
- Render specific parts of grid
- Sorting results
- Auto-paging. Change number of results per page
- Save params in session (Filters, Order, Page, Records per page)
- Detailed view of records
- Internationalization
- Decorators
- Callbacks
- Routing
4. Dependencies on Other Framework Components
- Zend_View
- Zend_Config
- Zend_Form
- Zend_Session
- Zend_Controller
- Zend_Registry
- Zend_Cache
- Zend_Exception
5. Theory of Operation
The component is instantiated with a mind-link that ...
6. Milestones / Tasks
Milestone 1: [DONE] Working prototype written and tested.
Milestone 2: Unit testing converted to PHPUnit.
Milestone 3: [DONE] Create initial documentation.
Milestone 4: Working code and tests checked into SVN.
Milestone 5: Submitted to Ready for Review.
7. Class Index
- Zend_Magic_Exception
- Zend_Magic (factory class)
- Zend_Magic_MindProbe
- Zend_Magic_MindProbe_Intent
- Zend_Magic_Action
- Zend_Magic_CodeGen
8. Use Cases
| UC-01 | UC-02 |
|---|---|
| $select = $db->select()->from('Users'); $grid = new * Zend_Grid::factory('Table',* Zend_Config $config, $gridId); $grid->setSource(new * Zend_Grid_Source_* Zend_Select($select)); $grid->deploy(); |
$select = $db->select()->from('Users',array('id','username','email','firstname','lastname','access')); $grid = new * Zend_Grid::factory('Table',* Zend_Config $config, $gridId); $grid->setSource(new * Zend_Grid_Source_* Zend_Select($select)); |
//Change title display for email column
$grid->updateColumn('email',array('title'=>"User's Email"));
//Id id column
$grid->updateColumn('id',array('hidden'=>1));
//Apply different css classes based on field value
$grid->setClassCellCondition('access', "'access' > 'admin'", "red", 'green');
$grid->deploy();|
... (see good use cases book)