Skip to content

Commit

Permalink
FIX: Ticket #7592 GridFieldDataColumns: Wrong documentation for getFi…
Browse files Browse the repository at this point in the history
…eldCasting Moved documentation to the appropriate function, added note about the two parameter callback function.
  • Loading branch information
jakr authored and chillu committed Jul 4, 2012
1 parent 8548014 commit 2069695
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions forms/gridfield/GridFieldDataColumns.php
Expand Up @@ -83,18 +83,19 @@ public function setFieldCasting($casting) {
}

/**
* 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" => '<a href=\"custom-admin/$ID\">$ID</a>'.
* Alternatively, pass a anonymous function, which takes one parameter: The list item.
*
* @return array
*/
public function getFieldCasting() {
return $this->fieldCasting;
}

/**
* 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" => '<a href=\"custom-admin/$ID\">$ID</a>'.
* 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) {
Expand Down

0 comments on commit 2069695

Please sign in to comment.