function ConfigEntityNormalizer::getDataWithoutInternals

Same name in other branches
  1. 9 core/modules/serialization/src/Normalizer/ConfigEntityNormalizer.php \Drupal\serialization\Normalizer\ConfigEntityNormalizer::getDataWithoutInternals()
  2. 8.9.x core/modules/serialization/src/Normalizer/ConfigEntityNormalizer.php \Drupal\serialization\Normalizer\ConfigEntityNormalizer::getDataWithoutInternals()
  3. 11.x core/modules/serialization/src/Normalizer/ConfigEntityNormalizer.php \Drupal\serialization\Normalizer\ConfigEntityNormalizer::getDataWithoutInternals()

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

3 calls to ConfigEntityNormalizer::getDataWithoutInternals()
ConfigEntityNormalizer::denormalize in core/modules/serialization/src/Normalizer/ConfigEntityNormalizer.php
ConfigEntityNormalizer::normalize in core/modules/serialization/src/Normalizer/ConfigEntityNormalizer.php
LayoutEntityDisplayNormalizer::getDataWithoutInternals in core/modules/layout_builder/src/Normalizer/LayoutEntityDisplayNormalizer.php
Gets the given data without the internal implementation details.
1 method overrides ConfigEntityNormalizer::getDataWithoutInternals()
LayoutEntityDisplayNormalizer::getDataWithoutInternals in core/modules/layout_builder/src/Normalizer/LayoutEntityDisplayNormalizer.php
Gets the given data without the internal implementation details.

File

core/modules/serialization/src/Normalizer/ConfigEntityNormalizer.php, line 41

Class

ConfigEntityNormalizer
Normalizes/denormalizes Drupal config entity objects into an array structure.

Namespace

Drupal\serialization\Normalizer

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.