I want to extend or overwrite the “Nice” Method of DBDecimal. I tried to add and register a extension:
But this don’t worked.
Why I need this? I use this field casting in ModelAdmin:
$dataColumns->setFieldCasting([ 'Quantity' => 'Decimal->Nice' ]);
This returns the value with 2 commas, but I need no commas.
If I use ‘Int->Nice’ I have no thousands seperator.
If I cast it myself, for example with a getFormattedQuantity field, I loose sorting functionality in ModelAdmin.
How to solve this?