public function OverridesSectionStorage::getTranslationLanguage in Layout Builder Symmetric Translations 8
Gets the language of the translation if any.
Return value
\Drupal\Core\Language\LanguageInterface|null The translation language if the current layout is for a translation otherwise NULL.
Overrides TranslatableSectionStorageInterface::getTranslationLanguage
File
- src/
Plugin/ SectionStorage/ OverridesSectionStorage.php, line 95
Class
Namespace
Drupal\layout_builder_st\Plugin\SectionStorageCode
public function getTranslationLanguage() {
if (!$this
->isDefaultTranslation()) {
return $this
->getEntity()
->language();
}
return NULL;
}