src/Forms/GridField/GridField.php
public function addDataFields($fields)
    {
        if ($this->customDataFields) {
            $this->customDataFields = array_merge($this->customDataFields, $fields);
        } else {
            $this->customDataFields = $fields;
        }
    }
public function addDataFields($fields)
    {
        if ($this->customDataFields) {
            $this->customDataFields = array_merge($this->customDataFields, $fields);
        } else {
            $this->customDataFields = $fields;
        }
    }
public function addDataFields ( $ fields ) { if ( $ this -> customDataFields ) { $ this -> customDataFields = array_merge ( $ this -> customDataFields , $ fields ) ; } else { $ this -> customDataFields = $ fields ; } }
Add additional calculated data fields to be used on this GridField

@param array $fields a map of fieldname to callback. The callback will
be passed the record as an argument.
Add additional calculated data fields to be used on this GridField