src/Shell/ImportShell.php
protected function _processData(Table $table, array $csvFields, array $data) : array
    {
        $schema = $table->getSchema();
        foreach ($data as $field => $value) {
            if (!empty($csvFields) && in_array($field, array_keys($csvFields))) {
                switch ($csvFields[$field]->getType()) {
                    case 'related':
                        $data[$field] = $this->_findRelatedRecord($table, $field, $value);
                        break;
                    case 'list':
                        $data[$field] = $this->_findListValue($table, $csvFields[$field]->getLimit(), $value);
                        break;
                    case 'country':
                        $data[$field] = $this->_findListValue($table, 'countries', $value);
                        break;
                }
            } else {
                if ('uuid' === $schema->columnType($field)) {
                    $data[$field] = $this->_findRelatedRecord($table, $field, $value);
                } else {
                    $data[$field] = $value;
                }
            }
        }

        return $data;
    }
protected function _processData(Table $table, array $csvFields, array $data) : array
    {
        $schema = $table->getSchema();
        foreach ($data as $field => $value) {
            if (!empty($csvFields) && in_array($field, array_keys($csvFields))) {
                switch ($csvFields[$field]->getType()) {
                    case 'related':
                        $data[$field] = $this->_findRelatedRecord($table, $field, $value);
                        break;
                    case 'list':
                        $data[$field] = $this->_findListValue($table, $csvFields[$field]->getLimit(), $value);
                        break;
                    case 'country':
                        $data[$field] = $this->_findListValue($table, 'countries', $value);
                        break;
                }
            } else {
                if ('uuid' === $schema->columnType($field)) {
                    $data[$field] = $this->_findRelatedRecord($table, $field, $value);
                } else {
                    $data[$field] = $value;
                }
            }
        }

        return $data;
    }
protected function _processData ( Table $ table , array $ csvFields , array $ data ) : array { $ schema = $ table -> getSchema ( ) ; foreach ( $ data as $ field => $ value ) { if ( ! empty ( $ csvFields ) && in_array ( $ field , array_keys ( $ csvFields ) ) ) { switch ( $ csvFields [ $ field ] -> getType ( ) ) { case 'related' : $ data [ $ field ] = $ this -> _findRelatedRecord ( $ table , $ field , $ value ) ; break ; case 'list' : $ data [ $ field ] = $ this -> _findListValue ( $ table , $ csvFields [ $ field ] -> getLimit ( ) , $ value ) ; break ; case 'country' : $ data [ $ field ] = $ this -> _findListValue ( $ table , 'countries' , $ value ) ; break ; } } else { if ( 'uuid' === $ schema -> columnType ( $ field ) ) { $ data [ $ field ] = $ this -> _findRelatedRecord ( $ table , $ field , $ value ) ; } else { $ data [ $ field ] = $ value ; } } } return $ data ; }
Process row data.

@param \Cake\ORM\Table $table Table instance
@param mixed[] $csvFields Table csv fields
@param mixed[] $data Entity data
@return mixed[]
Process row data .