Unverified Commit 2902531a authored by alexpott's avatar alexpott
Browse files

Issue #2833864 by RoSk0, colan, ressa, Chi, alexpott, joachim, loopy1492,...

Issue #2833864 by RoSk0, colan, ressa, Chi, alexpott, joachim, loopy1492, zoiosilva: Unmet installation requirements may contain render elements

(cherry picked from commit 857d454c1b26f6e24bc80d35bf596f7994736261)
parent c7f4fe4d
......@@ -2297,7 +2297,16 @@ function install_display_requirements($install_state, $requirements) {
// proceed in a single request so there is no good opportunity (and no
// good method) to warn the user anyway.
if (isset($requirement['severity']) && $requirement['severity'] == REQUIREMENT_ERROR) {
$failures[] = $requirement['title'] . ': ' . $requirement['value'] . "\n\n" . $requirement['description'];
$render_array = [
'#type' => 'inline_template',
'#template' => '{{ title }}:{{ value }}<br /><br />{{ description }}',
'#context' => [
'title' => $requirement['title'],
'value' => $requirement['value'],
'description' => $requirement['description'],
],
];
$failures[] = \Drupal::service('renderer')->renderPlain($render_array);
}
}
if (!empty($failures)) {
......
Supports Markdown
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