protected function ConfigEntityDenormalizer::prepareInput in Drupal 10
Same name and namespace in other branches
- 8 core/modules/jsonapi/src/Normalizer/ConfigEntityDenormalizer.php \Drupal\jsonapi\Normalizer\ConfigEntityDenormalizer::prepareInput()
- 9 core/modules/jsonapi/src/Normalizer/ConfigEntityDenormalizer.php \Drupal\jsonapi\Normalizer\ConfigEntityDenormalizer::prepareInput()
File
- core/
modules/ jsonapi/ src/ Normalizer/ ConfigEntityDenormalizer.php, line 27
Class
- ConfigEntityDenormalizer
- Converts the Drupal config entity object to a JSON:API array structure.
Namespace
Drupal\jsonapi\NormalizerCode
protected function prepareInput(array $data, ResourceType $resource_type, $format, array $context) {
$prepared = [];
foreach ($data as $key => $value) {
$prepared[$resource_type
->getInternalName($key)] = $value;
}
return $prepared;
}