Components/Column.php
public function getValue(array $row, array $rows = [])
    {
        if (isset($row[$this->getName()])) {
            $rawValue = $row[$this->getName()];
        } else {
            $rawValue = null;
        }
        // if a callback is set
        $callback = $this->getDisplayCallback();
        if (!is_null($callback)) {
            if (!is_callable($callback)) {
                throw new \Exception('displayCallback is not callable');
            }

            return $callback($rawValue, $row, $rows);
        } else {
            switch ($this->getDisplayFormat()) {
                case static::FORMAT_DATE:
                    $formatParams = $this->getDisplayFormatParams();
                    if (is_null($formatParams)) {
                        $formatParams = 'Y-m-d H:i:s';
                    }
                    if (!is_null($rawValue) && is_object($rawValue) && get_class($rawValue) == 'DateTime') {
                        return $rawValue->format($formatParams);
                    } else {
                        return '';
                    }
                    break;
                case static::FORMAT_TEXT:
                default:
                    if (is_array($rawValue)) {
                        return implode(',', $rawValue);
                    } else {
                        return $rawValue;
                    }
                    break;
            }
        }
    }
public function getValue(array $row, array $rows = [])
    {
        if (isset($row[$this->getName()])) {
            $rawValue = $row[$this->getName()];
        } else {
            $rawValue = null;
        }
        // if a callback is set
        $callback = $this->getDisplayCallback();
        if (!is_null($callback)) {
            if (!is_callable($callback)) {
                throw new \Exception('displayCallback is not callable');
            }

            return $callback($rawValue, $row, $rows);
        } else {
            switch ($this->getDisplayFormat()) {
                case static::FORMAT_DATE:
                    $formatParams = $this->getDisplayFormatParams();
                    if (is_null($formatParams)) {
                        $formatParams = 'Y-m-d H:i:s';
                    }
                    if (!is_null($rawValue) && is_object($rawValue) && get_class($rawValue) == 'DateTime') {
                        return $rawValue->format($formatParams);
                    } else {
                        return '';
                    }
                    break;
                case static::FORMAT_TEXT:
                default:
                    if (is_array($rawValue)) {
                        return implode(',', $rawValue);
                    } else {
                        return $rawValue;
                    }
                    break;
            }
        }
    }
public function getValue ( array $ row , array $ rows = [ ] ) { if ( isset ( $ row [ $ this -> getName ( ) ] ) ) { $ rawValue = $ row [ $ this -> getName ( ) ] ; } else { $ rawValue = null ; } // if a callback is set $ callback = $ this -> getDisplayCallback ( ) ; if ( ! is_null ( $ callback ) ) { if ( ! is_callable ( $ callback ) ) { throw new \ Exception ( 'displayCallback is not callable' ) ; } return $ callback ( $ rawValue , $ row , $ rows ) ; } else { switch ( $ this -> getDisplayFormat ( ) ) { case static :: FORMAT_DATE : $ formatParams = $ this -> getDisplayFormatParams ( ) ; if ( is_null ( $ formatParams ) ) { $ formatParams = 'Y-m-d H:i:s' ; } if ( ! is_null ( $ rawValue ) && is_object ( $ rawValue ) && get_class ( $ rawValue ) == 'DateTime' ) { return $ rawValue -> format ( $ formatParams ) ; } else { return '' ; } break ; case static :: FORMAT_TEXT : default : if ( is_array ( $ rawValue ) ) { return implode ( ',' , $ rawValue ) ; } else { return $ rawValue ; } break ; } } }
Get the formatted value to display.

priority formatter methods:
- callback
- known formats
- default (raw text)

@param       $row
@param array $rows

@return string

@throws \Exception
Get the formatted value to display .