You are here

layout_builder_at.module in Layout Builder Asymmetric Translation 8

Same filename and directory in other branches
  1. 8.2 layout_builder_at.module

Provides hook implementations for Layout Builder Asymmetric Translation.

File

layout_builder_at.module
View source
<?php

/**
 * @file
 * Provides hook implementations for Layout Builder Asymmetric Translation.
 */

/**
 * Implements hook_layout_builder_section_storage_alter().
 */
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');
}

Functions

Namesort descending Description
layout_builder_at_layout_builder_section_storage_alter Implements hook_layout_builder_section_storage_alter().