protected static function TranslationsHelperTrait::isTranslation in Layout Builder Symmetric Translations 8
Determines if the sections is for a translation.
Parameters
\Drupal\layout_builder\SectionStorageInterface $section_storage: The section storage.
Return value
bool TRUE if the section storage is for translation otherwise false.
8 calls to TranslationsHelperTrait::isTranslation()
- ComponentPluginTranslate::onBuildRender in src/
EventSubscriber/ ComponentPluginTranslate.php - Translates the plugin configuration if needed.
- InlineBlockEntityOperations::saveInlineBlockComponent in src/
InlineBlockEntityOperations.php - Override to ::saveTranslatedInlineBlock() for translations.
- LayoutBuilder::buildAdministrativeSection in src/
Element/ LayoutBuilder.php - Builds the render array for the layout section while editing.
- LayoutBuilder::createContextualLinkElement in src/
Element/ LayoutBuilder.php - Creates contextual link element for a component.
- LayoutBuilder::setTranslationAcess in src/
Element/ LayoutBuilder.php - Set the #access property based section storage translation.
File
- src/
TranslationsHelperTrait.php, line 23
Class
- TranslationsHelperTrait
- Trait for methods that will be added to \Drupal\layout_builder\LayoutEntityHelperTrait
Namespace
Drupal\layout_builder_stCode
protected static function isTranslation(SectionStorageInterface $section_storage) {
return $section_storage instanceof TranslatableSectionStorageInterface && !$section_storage
->isDefaultTranslation();
}