Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0843ba0

Browse filesBrowse files
committed
Extract the HTML from the ResponseRenderer::getDisplay method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent 2c5143f commit 0843ba0
Copy full SHA for 0843ba0

File tree

Expand file treeCollapse file tree

2 files changed

+8
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-5
lines changed
Open diff view settings
Collapse file

‎libraries/classes/ResponseRenderer.php‎

Copy file name to clipboardExpand all lines: libraries/classes/ResponseRenderer.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,11 @@ private function getDisplay(): string
280280
// if its content was already rendered
281281
// and, in this case, the header will be
282282
// in the content part of the request
283-
$retval = $this->header->getDisplay();
284-
$retval .= $this->HTML;
285-
$retval .= $this->footer->getDisplay();
286-
287-
return $retval;
283+
return (new Template())->render('base', [
284+
'header' => $this->header->getDisplay(),
285+
'content' => $this->HTML,
286+
'footer' => $this->footer->getDisplay(),
287+
]);
288288
}
289289

290290
/**
Collapse file

‎templates/base.twig‎

Copy file name to clipboard
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{ header|raw }}
2+
{{ content|raw }}
3+
{{ footer|raw }}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.