protected function _transformDataFields(array $history, string $model): array
    {
        $tableConfig = [];
        if (defined('PHPUNIT_TESTSUITE')) {
            $tableConfig = ['className' => 'ModelHistoryTestApp\Model\Table\\' . ucfirst($model) . 'Table'];
            $model = ucfirst($model) . 'Table';
        }
        $fieldConfig = TableRegistry::get($model, $tableConfig)->getFields();
        foreach ($history as $index => $entity) {
            $entityData = $entity->data;
            foreach ($entityData as $field => $value) {
                if (!isset($fieldConfig[$field]) || $fieldConfig[$field]['searchable'] !== true) {
                    continue;
                }
                if (isset($fieldConfig[$field]['displayParser']) && is_callable($fieldConfig[$field]['displayParser'])) {
                    $callback = $fieldConfig[$field]['displayParser'];
                    $entityData[$field] = $callback($field, $value, $entity);
                    continue;
                }
                $filterClass = Transform::get($fieldConfig[$field]['type']);
                $entityData[$field] = $filterClass->display($field, $value, $model);
            }
            $history[$index]->data = $entityData;
        }

        return $history;
    }