protected function convertModel($model, $environment)
    {
        $definition = $environment->getDataDefinition();
        $properties = $definition->getPropertiesDefinition();
        $palette    = $definition->getPalettesDefinition()->findPalette($model);
        $values     = [];
        $labels     = [];
        // Show only allowed fields.
        foreach ($palette->getVisibleProperties($model) as $paletteProperty) {
            if (!($property = $properties->getProperty($paletteProperty->getName()))) {
                throw new DcGeneralRuntimeException('Unable to retrieve property ' . $paletteProperty->getName());
            }

            // Make it human readable.
            $values[$paletteProperty->getName()] = ViewHelpers::getReadableFieldValue(
                $environment,
                $property,
                $model
            );

            $labels[$paletteProperty->getName()] = $this->getPropertyLabel($environment, $property);
        }

        return [
            'labels' => $labels,
            'values' => $values
        ];
    }