cvs: pear /Structures_DataGrid/DataGrid Column.php
| From: | Olivier Guilyardi | Date: | Thu, 04 Oct 2007 14:38:39 +0000 |
| Subject: | cvs: pear /Structures_DataGrid/DataGrid Column.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-48747@lists.php.net to get a copy of this message | ||
olivierg Thu Oct 4 14:38:39 2007 UTC
Modified files:
/pear/Structures_DataGrid/DataGrid Column.php
Log:
document the formatter callback arguments
http://cvs.php.net/viewvc.cgi/pear/Structures_DataGrid/DataGrid/Column.php?r1=1.53&r2=1.54&diff_format=u
Index: pear/Structures_DataGrid/DataGrid/Column.php
diff -u pear/Structures_DataGrid/DataGrid/Column.php:1.53
pear/Structures_DataGrid/DataGrid/Column.php:1.54
--- pear/Structures_DataGrid/DataGrid/Column.php:1.53 Fri Jun 15 19:52:30 2007
+++ pear/Structures_DataGrid/DataGrid/Column.php Thu Oct 4 14:38:39 2007
@@ -35,9 +35,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * CSV file id: $Id: Column.php,v 1.53 2007/06/15 19:52:30 olivierg Exp $
+ * CSV file id: $Id: Column.php,v 1.54 2007/10/04 14:38:39 olivierg Exp $
*
- * @version $Revision: 1.53 $
+ * @version $Revision: 1.54 $
* @package Structures_DataGrid
* @category Structures
* @license http://opensource.org/licenses/bsd-license.php
New BSD License
@@ -48,7 +48,7 @@
*
* This class represents a single column for the DataGrid.
*
- * @version $Revision: 1.53 $
+ * @version $Revision: 1.54 $
* @author Andrew S. Nagy <asnagy@webitecture.org>
* @author Olivier Guilyardi <olivier@samalyse.com>
* @author Mark Wiesemann <wiesemann@php.net>
@@ -314,6 +314,22 @@
* Define a formatting callback function with optional arguments for
* this column.
*
+ * The callback function receives the following array as its first argument:
+ * <code>
+ * array(
+ * 'record' => associative array of all fields values for this record,
+ * 'fieldName' => the field name of this column,
+ * 'columnName' => the label (header) of this column,
+ * 'orderBy' => the field name to sort this column by,
+ * 'attribs' => this column's attributes,
+ * 'currRow' => zero-based row index,
+ * 'currCol' => zero-based column index,
+ * );
+ * </code>
+ *
+ * If you pass the optional $arguments parameter to setFormatter(), the callback
+ * function will receive it as its second argument.
+ *
* @param mixed $formatter Callback PHP pseudo-type (Array or String)
* @param array $arguments Associative array of parameters passed to
* as second argument to the callback function