X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Frender%2FPageBuilder.php;h=85e1d59df9fe4866a3df19144b193debfe1ee480;hb=1a8ac737e52cb25a5c346232ee398f5908cee7d7;hp=2779eb90ddcea62c0637f551f7caee319207d3bf;hpb=6132d64748dfc6806ed25f71d2e078a5ed29d071;p=github%2Fshaarli%2FShaarli.git diff --git a/application/render/PageBuilder.php b/application/render/PageBuilder.php index 2779eb90..85e1d59d 100644 --- a/application/render/PageBuilder.php +++ b/application/render/PageBuilder.php @@ -69,6 +69,15 @@ class PageBuilder $this->isLoggedIn = $isLoggedIn; } + /** + * Reset current state of template rendering. + * Mostly useful for error handling. We remove everything, and display the error template. + */ + public function reset(): void + { + $this->tpl = false; + } + /** * Initialize all default tpl tags. */