You are here

function layout_builder_at_layout_builder_section_storage_alter in Layout Builder Asymmetric Translation 8

Same name and namespace in other branches
  1. 8.2 layout_builder_at.module \layout_builder_at_layout_builder_section_storage_alter()

Implements hook_layout_builder_section_storage_alter().

File

./layout_builder_at.module, line 11
Provides hook implementations for Layout Builder Asymmetric Translation.

Code

function layout_builder_at_layout_builder_section_storage_alter(array &$definitions) {

  /** @var \Drupal\layout_builder\SectionStorage\SectionStorageDefinition $overrides_storage_definition */
  $overrides_storage_definition = $definitions['overrides'];

  // Override the section storage definition to load the entity from translation
  // context when editing the layout.
  $overrides_storage_definition
    ->setClass('\\Drupal\\layout_builder_at\\Plugin\\SectionStorage\\TranslatableOverridesSectionStorage');
}