Skip to content
Snippets Groups Projects

#3218673 translated node title for caption

Closed #3218673 translated node title for caption
1 unresolved thread
1 unresolved thread
2 files
+ 4
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -421,10 +421,12 @@ class PhotoswipeFieldFormatter extends FormatterBase {
}
foreach ($items as $delta => $item) {
$untranslatedEntity = $items->getEntity();
$entity = $untranslatedEntity->hasTranslation($langcode) ? $untranslatedEntity->getTranslation($langcode) : $untranslatedEntity;
$elements[$delta] = [
'#theme' => 'photoswipe_image_formatter',
'#item' => $item,
'#entity' => $items->getEntity(),
'#entity' => $entity,
'#display_settings' => $settings,
'#delta' => $delta,
];
Loading