API CHANGE Automatically using DBField->Nice() in tabular view of TableListFields (and subclasses like ComplexTableField) instead of using the scalar value. This means for example values casted as Boolean will render as "Yes"/"No" rather than "1"/"0"

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77549 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-05-21 04:48:24 +00:00
parent a2a507f73c
commit 90ebeaf741

View File

@ -1267,6 +1267,8 @@ class TableListField_Item extends ViewableData {
// casting
if(array_key_exists($fieldName, $this->parent->fieldCasting)) {
$value = $this->parent->getCastedValue($value, $this->parent->fieldCasting[$fieldName]);
} elseif(is_object($value) && method_exists($value, 'Nice')) {
$value = $value->Nice();
}
// formatting