cvs: pear /Structures_DataGrid package2.xml /Structures_DataGrid/DataGrid Column.php

From: Date: Fri, 16 Jun 2006 17:05:23 +0000
Subject: cvs: pear /Structures_DataGrid package2.xml /Structures_DataGrid/DataGrid Column.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-40769@lists.php.net to get a copy of this message
wiesemann Fri Jun 16 17:05:23 2006 UTC Modified files: /pear/Structures_DataGrid package2.xml /pear/Structures_DataGrid/DataGrid Column.php Log: - added note about request #6720 in package2.xml - added a BC fix for the changed behaviour of the column formatters http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/package2.xml?r1=1.6&r2=1.7&diff_format=u Index: pear/Structures_DataGrid/package2.xml diff -u pear/Structures_DataGrid/package2.xml:1.6 pear/Structures_DataGrid/package2.xml:1.7 --- pear/Structures_DataGrid/package2.xml:1.6 Wed Jun 14 19:11:17 2006 +++ pear/Structures_DataGrid/package2.xml Fri Jun 16 17:05:22 2006 @@ -48,6 +48,14 @@ # is now required to use the Structures_DataGrid::getRenderer() method # # in order to access the renderer object. # # # +# Arguments for column formatters are not available anymore in the first # +# parameter of self-defined formatter functions. There is a new second # +# parameter which holds these arguments (see also below, request #6720). # +# If you want to have the old behaviour (i.e. all arguments in the array # +# of the first parameter), just add the following line # +# $_STRUCTURES_DATAGRID['column_formatter_BC'] = true; # +# before adding your columns to the datagrid. # +# # # Adding or removing single records via Structures_DataGrid::addRecord() # # and Structures_DataGrid::dropRecord() isn't possible anymore. # ########################################################################## @@ -64,11 +72,13 @@ - request #5758: new parameters for Structures_DataGrid_Column::formatter() callback: 'fieldName', 'columnName', 'orderBy', 'attribs' -- request #6621: new method getColumnByName() that returns a reference to - a column object - request #5859: the rendering layer has gone through a long refactoring process and a new and flexible renderer driver interface has been implemented +- request #6720: arguments for column formatters can now be added via the (new) + seventh column constructor (for example, you can now add arrays as arguments) +- request #6621: new method getColumnByName() that returns a reference to + a column object OTHER FIXES AND CHANGES: http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/Column.php?r1=1.27&r2=1.28&diff_format=u Index: pear/Structures_DataGrid/DataGrid/Column.php diff -u pear/Structures_DataGrid/DataGrid/Column.php:1.27 pear/Structures_DataGrid/DataGrid/Column.php:1.28 --- pear/Structures_DataGrid/DataGrid/Column.php:1.27 Sun Jun 11 18:13:59 2006 +++ pear/Structures_DataGrid/DataGrid/Column.php Fri Jun 16 17:05:22 2006 @@ -16,14 +16,14 @@ // | Author: Andrew Nagy <asnagy@webitecture.org> | // +----------------------------------------------------------------------+ // -// $Id: Column.php,v 1.27 2006/06/11 18:13:59 olivierg Exp $ +// $Id: Column.php,v 1.28 2006/06/16 17:05:22 wiesemann Exp $ /** * Structures_DataGrid_Column Class * * This class represents a single column for the DataGrid. * - * @version $Revision: 1.27 $ + * @version $Revision: 1.28 $ * @author Andrew S. Nagy <asnagy@webitecture.org> * @access public * @package Structures_DataGrid @@ -223,11 +223,16 @@ $paramList['attribs'] = $this->attribs; // Call the formatter - if ($this->formatterArgs) { - $formatted = call_user_func ($this->formatter, $paramList, - $this->formatterArgs); + if (isset($GLOBALS['_STRUCTURES_DATAGRID']['column_formatter_BC'])) { + $paramList = array_merge($this->formatterArgs, $paramList); + $formatted = call_user_func($this->formatter, $paramList); } else { - $formatted = call_user_func ($this->formatter, $paramList); + if ($this->formatterArgs) { + $formatted = call_user_func($this->formatter, $paramList, + $this->formatterArgs); + } else { + $formatted = call_user_func($this->formatter, $paramList); + } } return $formatted;

« previous php.pear.cvs (#40769) next »