Skip to content
Snippets Groups Projects

Issue #3341586: Allow to get the label from the field_display_label module

3 files
+ 16
0
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -175,6 +175,11 @@ class PatternOneForAllFormatter extends FieldWrapperBase implements ContainerFac
if ($field['source'] == '_label') {
$fields[$field['destination']][] = $items->getFieldDefinition()->getLabel();
}
elseif ($field['source'] == '_field_display_label') {
if ($this->moduleHandler->moduleExists('field_display_label')) {
$fields[$field['destination']][] = $items->getFieldDefinition()->getThirdPartySetting('field_display_label', 'display_label');
}
}
elseif ($field['source'] == '_formatted') {
$field_output = $this->getFieldOutput($items, $langcode);
// Take the element children from the field output and return them.
Loading