aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/render
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-01-18 17:50:11 +0100
committerArthurHoaro <arthur@hoa.ro>2020-01-26 11:34:14 +0100
commit6c50a6ccceecf54850e62c312ab2397b84d89ab4 (patch)
tree3205aa447930eab020ea04bf00082880abec5001 /application/render
parent1410dce2db310e71b5e683b0871c2f28d8807844 (diff)
downloadShaarli-6c50a6ccceecf54850e62c312ab2397b84d89ab4.tar.gz
Shaarli-6c50a6ccceecf54850e62c312ab2397b84d89ab4.tar.zst
Shaarli-6c50a6ccceecf54850e62c312ab2397b84d89ab4.zip
Render login page through Slim controller
Diffstat (limited to 'application/render')
-rw-r--r--application/render/PageBuilder.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/application/render/PageBuilder.php b/application/render/PageBuilder.php
index 65e85aaf..f4fefda8 100644
--- a/application/render/PageBuilder.php
+++ b/application/render/PageBuilder.php
@@ -200,6 +200,23 @@ class PageBuilder
200 } 200 }
201 201
202 /** 202 /**
203 * Render a specific page as string (using a template file).
204 * e.g. $pb->render('picwall');
205 *
206 * @param string $page Template filename (without extension).
207 *
208 * @return string Processed template content
209 */
210 public function render(string $page): string
211 {
212 if ($this->tpl === false) {
213 $this->initialize();
214 }
215
216 return $this->tpl->draw($page, true);
217 }
218
219 /**
203 * Render a 404 page (uses the template : tpl/404.tpl) 220 * Render a 404 page (uses the template : tpl/404.tpl)
204 * usage: $PAGE->render404('The link was deleted') 221 * usage: $PAGE->render404('The link was deleted')
205 * 222 *