Commit 6c4dbeef authored by catch's avatar catch

Issue #2823600 by cebasqueira, jungle, amit.drupal, shashikant_chauhan:...

Issue #2823600 by cebasqueira, jungle, amit.drupal, shashikant_chauhan: Incorrect case in pre_render callback in TextTrimmedFormatter::viewElements()

(cherry picked from commit 12dbc74d)
parent bcb0a90f
......@@ -74,7 +74,7 @@ public function viewElements(FieldItemListInterface $items, $langcode) {
// because text_pre_render_summary() must run last.
$element += \Drupal::service('element_info')->getInfo($element['#type']);
// Add the #pre_render callback that renders the text into a summary.
$element['#pre_render'][] = '\Drupal\text\Plugin\field\FieldFormatter\TextTrimmedFormatter::preRenderSummary';
$element['#pre_render'][] = [TextTrimmedFormatter::class, 'preRenderSummary'];
// Pass on the trim length to the #pre_render callback via a property.
$element['#text_summary_trim_length'] = $this->getSetting('trim_length');
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment