Prado\Web\UI\WebControls\TDataGridColumn::formatDataValue PHP Метод

formatDataValue() защищенный Метод

If the format string is empty, the original value is converted into a string and returned. If the format string starts with '#', the string is treated as a PHP expression within which the token '{0}' is translated with the data value to be formated. Otherwise, the format string and the data value are passed as the first and second parameters in {@link sprintf}.
protected formatDataValue ( $formatString, $value ) : string
Результат string the formatted result
    protected function formatDataValue($formatString, $value)
    {
        if ($formatString === '') {
            return TPropertyValue::ensureString($value);
        } else {
            if ($formatString[0] === '#') {
                $expression = strtr(substr($formatString, 1), array('{0}' => '$value'));
                try {
                    if (eval("\$result={$expression};") === false) {
                        throw new Exception('');
                    }
                    return $result;
                } catch (Exception $e) {
                    throw new TInvalidDataValueException('datagridcolumn_expression_invalid', get_class($this), $expression, $e->getMessage());
                }
            } else {
                return sprintf($formatString, $value);
            }
        }
    }