mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge pull request #1093 from dhensby/patch-1
Implement `TemplateGlobalProvider` on `SiteConfig`
This commit is contained in:
commit
3f902eb9fc
@ -17,7 +17,7 @@
|
|||||||
* @author Tom Rix
|
* @author Tom Rix
|
||||||
* @package cms
|
* @package cms
|
||||||
*/
|
*/
|
||||||
class SiteConfig extends DataObject implements PermissionProvider {
|
class SiteConfig extends DataObject implements PermissionProvider, TemplateGlobalProvider {
|
||||||
private static $db = array(
|
private static $db = array(
|
||||||
"Title" => "Varchar(255)",
|
"Title" => "Varchar(255)",
|
||||||
"Tagline" => "Varchar(255)",
|
"Tagline" => "Varchar(255)",
|
||||||
@ -309,4 +309,14 @@ class SiteConfig extends DataObject implements PermissionProvider {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add $SiteConfig to all SSViewers
|
||||||
|
*/
|
||||||
|
public static function get_template_global_variables() {
|
||||||
|
return array(
|
||||||
|
'SiteConfig' => 'current_site_config',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user