From 20696958df3adf0843d405873684275d548b39c4 Mon Sep 17 00:00:00 2001 From: jakr Date: Wed, 4 Jul 2012 16:07:22 +0200 Subject: [PATCH] FIX: Ticket #7592 GridFieldDataColumns: Wrong documentation for getFieldCasting Moved documentation to the appropriate function, added note about the two parameter callback function. --- forms/gridfield/GridFieldDataColumns.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/forms/gridfield/GridFieldDataColumns.php b/forms/gridfield/GridFieldDataColumns.php index fe858c07b..49b37faf1 100644 --- a/forms/gridfield/GridFieldDataColumns.php +++ b/forms/gridfield/GridFieldDataColumns.php @@ -83,11 +83,6 @@ class GridFieldDataColumns implements GridField_ColumnProvider { } /** - * Specify custom formatting for fields, e.g. to render a link instead of pure text. - * Caution: Make sure to escape special php-characters like in a normal php-statement. - * Example: "myFieldName" => '$ID'. - * Alternatively, pass a anonymous function, which takes one parameter: The list item. - * * @return array */ public function getFieldCasting() { @@ -95,6 +90,12 @@ class GridFieldDataColumns implements GridField_ColumnProvider { } /** + * Specify custom formatting for fields, e.g. to render a link instead of pure text. + * Caution: Make sure to escape special php-characters like in a normal php-statement. + * Example: "myFieldName" => '$ID'. + * Alternatively, pass a anonymous function, which takes two parameters: + * The value returned by Convert::raw2xml and the original list item. + * * @param array $formatting */ public function setFieldFormatting($formatting) {