You are here

public function OverridesSectionStorage::getTranslatedConfiguration in Layout Builder Symmetric Translations 8

Gets the translated configuration for the layout.

Return value

array The translated configuration for the layout.

Overrides TranslatableSectionStorageInterface::getTranslatedConfiguration

File

src/Plugin/SectionStorage/OverridesSectionStorage.php, line 85

Class

OverridesSectionStorage

Namespace

Drupal\layout_builder_st\Plugin\SectionStorage

Code

public function getTranslatedConfiguration() {
  if ($this
    ->getEntity()
    ->get(OverridesSectionStorage::TRANSLATED_CONFIGURATION_FIELD_NAME)
    ->isEmpty()) {
    return [];
  }
  return $this
    ->getEntity()
    ->get(OverridesSectionStorage::TRANSLATED_CONFIGURATION_FIELD_NAME)
    ->getValue()[0];
}