public function render_grid(Zend_View $pView, $pID, $pStore_ID, array $pColumns) { Zupal_Grid_Maker::prep_view($pView); $identifier = $this->table()->idField(); $cache = Zupal_Bootstrap::$registry->cache; if (!$cache->test('user_grid')) { ob_start(); Zupal_Grid_Maker::grid($pID, $pStore_ID, $pColumns, $this->table()->idField()); $cache->save(ob_get_clean(), 'user_grid'); } return $cache->load('user_grid'); }
public function render_grid(Zend_View $pView, $pID, $pStore, array $pColumns) { Zupal_Grid_Maker::prep_view($pView); $identifier = $this->table()->idField(); $cache = Zupal_Bootstrap::$registry->cache; if (!$cache->test('modules_grid')) { ?> <table id="igrid_<?php echo $pID; ?> _modules_node" rowsPerPage="10" style="height: 400px" jsId="igrid_<?php echo $pID; ?> " dojoType="dojox.grid.DataGrid" clientSort="true" query="{ <?php echo $identifier; ?> : '*' }" store="<?php echo $pStore; ?> "> <thead> <tr> <th get="modules_view" width="25"> </th> <th get="modules_edit" width="25"> </th> <?php foreach ($pColumns as $key => $column) { ?> <?php if (is_array($column)) { ?> <?php echo $this->render_array_column($key, $column); } elseif (is_string($column)) { ?> <th field="<?php echo $key; ?> "><?php echo $column; ?> </th> <?php } elseif (is_object($column)) { // must have a __toString() method ?> <?php echo $column; } } ?> </tr> </thead> </table> <?php } return $cache->load('modules_grid'); }
/** * @see Zupal_Grid_IGrid::render_grid() * * @param Zend_View $pView * @param unknown_type $pID * @param unknown_type $pStore_ID * @param array $pColumns */ public function render_grid(Zend_View $pView, $pID, $pStore_ID, array $pColumns) { Zupal_Grid_Maker::prep_view($pView); $columns = array(); foreach ($pColumns as $k => $v) { $columns[$k] = $v; } return Zupal_Grid_Maker::querygrid($pID, $pStore_ID, $columns, 'id', array('onRowClick' => 'artist_row_click')); //, array('onRowClick' => 'artist_row_click')); }
/** * @see Zupal_Grid_IGrid::render_store() * * @param unknown_type $pStore_ID * @param unknown_type $pURL */ public function render_store($pStore_ID, $pURL) { return Zupal_Grid_Maker::store($pStore_ID, $pURL); }
protected function render_array_column($pKey, $pColumn) { return Zupal_Grid_Maker::array_column($pKey, $pColumn); }