mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX: Ticket #7592 GridFieldDataColumns: Wrong documentation for getFieldCasting Moved documentation to the appropriate function, added note about the two parameter callback function.
This commit is contained in:
parent
85480142c1
commit
20696958df
@ -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" => '<a href=\"custom-admin/$ID\">$ID</a>'.
|
||||
* 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" => '<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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user