Skip to content
Snippets Groups Projects

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

3 files
+ 36
2
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -180,6 +180,11 @@ class PatternOneForAllFormatter extends FieldWrapperBase implements ContainerFac
@@ -180,6 +180,11 @@ class PatternOneForAllFormatter extends FieldWrapperBase implements ContainerFac
if ($field['source'] == '_label') {
if ($field['source'] == '_label') {
$fields[$field['destination']][] = $items->getFieldDefinition()->getLabel();
$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') {
elseif ($field['source'] == '_formatted') {
$field_output = $this->getFieldOutput($items, $langcode);
$field_output = $this->getFieldOutput($items, $langcode);
// Take the element children from the field output and return them.
// Take the element children from the field output and return them.
Loading