From 2c274c838ece66256a0fc94fc3d9680f212cfff9 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Fri, 13 Jan 2017 09:16:13 +1300 Subject: [PATCH] API Shift Security page class config to separate option --- src/Security/Security.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Security/Security.php b/src/Security/Security.php index 423b1a8bf..c5a71e7b5 100644 --- a/src/Security/Security.php +++ b/src/Security/Security.php @@ -124,6 +124,14 @@ class Security extends Controller implements TemplateGlobalProvider */ private static $template_main = 'Page'; + /** + * Class to use for page rendering + * + * @var string + * @config + */ + private static $page_class = 'Page'; + /** * Default message set used in permission failures. * @@ -515,7 +523,7 @@ class Security extends Controller implements TemplateGlobalProvider } // Use the default setting for which Page to use to render the security page - $pageClass = (string) $this->stat('template_main'); + $pageClass = $this->stat('page_class'); $tmpPage = new $pageClass; $tmpPage->Title = $title; /** @skipUpgrade */