function EntityDenormalizerBase::normalize
Same name and namespace in other branches
- 10 core/modules/jsonapi/src/Normalizer/EntityDenormalizerBase.php \Drupal\jsonapi\Normalizer\EntityDenormalizerBase::normalize()
- 11.x core/modules/jsonapi/src/Normalizer/EntityDenormalizerBase.php \Drupal\jsonapi\Normalizer\EntityDenormalizerBase::normalize()
- 9 core/modules/jsonapi/src/Normalizer/EntityDenormalizerBase.php \Drupal\jsonapi\Normalizer\EntityDenormalizerBase::normalize()
- 8.9.x core/modules/jsonapi/src/Normalizer/EntityDenormalizerBase.php \Drupal\jsonapi\Normalizer\EntityDenormalizerBase::normalize()
Normalizes data into a set of arrays/scalars.
Parameters
mixed $object: Data to normalize.
string|null $format: Format the normalization result will be encoded as.
array<string, mixed> $context: Context options for the normalizer.
Return value
array|string|int|float|bool|\ArrayObject<mixed, mixed>|null \ArrayObject is used to make sure an empty object is encoded as an object not an array.
File
-
core/
modules/ jsonapi/ src/ Normalizer/ EntityDenormalizerBase.php, line 88
Class
- EntityDenormalizerBase
- Converts the Drupal entity object to a JSON:API array structure.
Namespace
Drupal\jsonapi\NormalizerCode
public function normalize($object, $format = NULL, array $context = []) : array|string|int|float|bool|\ArrayObject|null {
throw new \LogicException('This method should never be called.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.