aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/render/PageBuilder.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-01-26 11:41:10 +0100
committerGitHub <noreply@github.com>2020-01-26 11:41:10 +0100
commitc653ae3bfb11f663a52f55817e6d02a66d0852c8 (patch)
treed5a03a3e425180f1fafb646c8ec68a4b8458d0b3 /application/render/PageBuilder.php
parent1410dce2db310e71b5e683b0871c2f28d8807844 (diff)
parent27ceea2aeeed69b43fef4ebff35ec8004fcc2e45 (diff)
downloadShaarli-c653ae3bfb11f663a52f55817e6d02a66d0852c8.tar.gz
Shaarli-c653ae3bfb11f663a52f55817e6d02a66d0852c8.tar.zst
Shaarli-c653ae3bfb11f663a52f55817e6d02a66d0852c8.zip
Render login page through Slim controller (#1401)
Render login page through Slim controller
Diffstat (limited to 'application/render/PageBuilder.php')
-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 *