API Shift Security page class config to separate option

This commit is contained in:
Damian Mooyman 2017-01-13 09:16:13 +13:00
parent 3f1cda8510
commit 2c274c838e
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A

View File

@ -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 */