Пример #1
0
 /**
  * @param mixed $value
  * @return string
  */
 protected function formatValue($value)
 {
     $value = parent::formatValue($value);
     $decimals = $this->numberFormat[self::NUMBER_FORMAT_DECIMALS];
     $decPoint = $this->numberFormat[self::NUMBER_FORMAT_DECIMAL_POINT];
     $thousandsSep = $this->numberFormat[self::NUMBER_FORMAT_THOUSANDS_SEPARATOR];
     return is_numeric($value) ? number_format($value, $decimals, $decPoint, $thousandsSep) : $value;
 }
Пример #2
0
 /**
  * @param mixed $value
  * @return mixed
  */
 protected function formatValue($value)
 {
     $value = parent::formatValue($value);
     if ($this->truncate) {
         $truncate = $this->truncate;
         $value = $truncate($value);
     }
     return $value;
 }