Skip to content
Snippets Groups Projects
Commit 12dbc74d authored by catch's avatar catch
Browse files

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()
parent 09ad5fdb
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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');
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment