silverstripe-framework/Forms/NumericField_Readonly.php
Damian Mooyman 8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00

31 lines
396 B
PHP

<?php
namespace SilverStripe\Forms;
/**
* Readonly version of a numeric field.
*/
class NumericField_Readonly extends ReadonlyField
{
/**
* @return static
*/
public function performReadonlyTransformation()
{
return clone $this;
}
/**
* @return string
*/
public function Value()
{
return $this->value ?: '0';
}
public function getValueCast()
{
return 'Decimal';
}
}