You are here

protected static function ConfigEntityNormalizer::getDataWithoutInternals in JSON:API 8

Gets the given data without the internal implementation details.

Parameters

array $data: The data that is either currently or about to be stored in configuration.

Return value

array The same data, but without internals. Currently, that is only the '_core' key, which is reserved by Drupal core to handle complex edge cases correctly. Data in the '_core' key is irrelevant to clients reading configuration, and is not allowed to be set by clients writing configuration: it is for Drupal core only, and managed by Drupal core.

See also

https://www.drupal.org/node/2653358

\Drupal\serialization\Normalizer\ConfigEntityNormalizer::getDataWithoutInternals

1 call to ConfigEntityNormalizer::getDataWithoutInternals()
ConfigEntityNormalizer::getFields in src/Normalizer/ConfigEntityNormalizer.php
Gets the field names for the given entity.

File

src/Normalizer/ConfigEntityNormalizer.php, line 78

Class

ConfigEntityNormalizer
Converts the Drupal config entity object to a JSON API array structure.

Namespace

Drupal\jsonapi\Normalizer

Code

protected static function getDataWithoutInternals(array $data) {
  return array_diff_key($data, [
    '_core' => TRUE,
  ]);
}