trait TranslationsHelperTrait in Layout Builder Symmetric Translations 8
Trait for methods that will be added to \Drupal\layout_builder\LayoutEntityHelperTrait
Hierarchy
- trait \Drupal\layout_builder_st\TranslationsHelperTrait
4 files declare their use of TranslationsHelperTrait
- ComponentPluginTranslate.php in src/
EventSubscriber/ ComponentPluginTranslate.php - LayoutBuilder.php in src/
Element/ LayoutBuilder.php - LayoutBuilderTranslationAccessCheck.php in src/
Access/ LayoutBuilderTranslationAccessCheck.php - OverridesEntityForm.php in src/
Form/ OverridesEntityForm.php
File
- src/
TranslationsHelperTrait.php, line 12
Namespace
Drupal\layout_builder_stView source
trait TranslationsHelperTrait {
/**
* Determines if the sections is for a translation.
*
* @param \Drupal\layout_builder\SectionStorageInterface $section_storage
* The section storage.
*
* @return bool
* TRUE if the section storage is for translation otherwise false.
*/
protected static function isTranslation(SectionStorageInterface $section_storage) {
return $section_storage instanceof TranslatableSectionStorageInterface && !$section_storage
->isDefaultTranslation();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TranslationsHelperTrait:: |
protected static | function | Determines if the sections is for a translation. |