Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
64 | protected function renderView( |
||
65 | string $title, |
||
66 | string $content, |
||
67 | ?string $header = null, |
||
68 | array $actions = [] |
||
69 | ): HttpResponse { |
||
70 | if (!$header) { |
||
71 | $header = $title; |
||
72 | } |
||
73 | |||
74 | $this->template = new Template($title); |
||
75 | $this->template->assign('header', $header); |
||
76 | $this->template->assign('actions', implode(PHP_EOL, $actions)); |
||
77 | $this->template->assign('content', $content); |
||
78 | |||
79 | ob_start(); |
||
80 | $this->template->display_one_col_template(); |
||
81 | $html = ob_get_contents(); |
||
82 | ob_end_clean(); |
||
83 | |||
84 | return HttpResponse::create($html); |
||
85 | } |
||
87 |