You are here

protected static function LayoutEntityDisplayNormalizer::getDataWithoutInternals in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Normalizer/LayoutEntityDisplayNormalizer.php \Drupal\layout_builder\Normalizer\LayoutEntityDisplayNormalizer::getDataWithoutInternals()
  2. 10 core/modules/layout_builder/src/Normalizer/LayoutEntityDisplayNormalizer.php \Drupal\layout_builder\Normalizer\LayoutEntityDisplayNormalizer::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.

Overrides ConfigEntityNormalizer::getDataWithoutInternals

See also

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

File

core/modules/layout_builder/src/Normalizer/LayoutEntityDisplayNormalizer.php, line 24

Class

LayoutEntityDisplayNormalizer
Normalizes/denormalizes LayoutEntityDisplay objects into an array structure.

Namespace

Drupal\layout_builder\Normalizer

Code

protected static function getDataWithoutInternals(array $data) {
  $data = parent::getDataWithoutInternals($data);

  // Do not expose the actual layout sections in normalization.
  // @todo Determine what to expose here in
  //   https://www.drupal.org/node/2942975.
  unset($data['third_party_settings']['layout_builder']['sections']);
  return $data;
}