layout_builder_at.module in Layout Builder Asymmetric Translation 8
Same filename and directory in other branches
Provides hook implementations for Layout Builder Asymmetric Translation.
File
layout_builder_at.moduleView 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
Name | Description |
---|---|
layout_builder_at_layout_builder_section_storage_alter | Implements hook_layout_builder_section_storage_alter(). |