You are here

class LayoutEntityDisplayNormalizer in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Normalizer/LayoutEntityDisplayNormalizer.php \Drupal\layout_builder\Normalizer\LayoutEntityDisplayNormalizer
  2. 9 core/modules/layout_builder/src/Normalizer/LayoutEntityDisplayNormalizer.php \Drupal\layout_builder\Normalizer\LayoutEntityDisplayNormalizer

Normalizes/denormalizes LayoutEntityDisplay objects into an array structure.

@internal Tagged services are internal.

Hierarchy

Expanded class hierarchy of LayoutEntityDisplayNormalizer

1 file declares its use of LayoutEntityDisplayNormalizer
LayoutBuilderServiceProvider.php in core/modules/layout_builder/src/LayoutBuilderServiceProvider.php

File

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

Namespace

Drupal\layout_builder\Normalizer
View source
class LayoutEntityDisplayNormalizer extends ConfigEntityNormalizer {

  /**
   * {@inheritdoc}
   */
  protected $supportedInterfaceOrClass = LayoutEntityDisplayInterface::class;

  /**
   * {@inheritdoc}
   */
  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;
  }

  /**
   * {@inheritdoc}
   */
  public function hasCacheableSupportsMethod() : bool {
    return TRUE;
  }

}

Members