From 1a1920a004fc7711e5097e9d703f70fe99f1a818 Mon Sep 17 00:00:00 2001 From: MattyBalaam Date: Tue, 21 May 2013 14:30:51 +0200 Subject: [PATCH] Update WidgetPageExtension.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changing statics to private to be 3.1 compatible. I’m not sure, but would 'SideBarView' need to be defined as an allowed_action too? --- code/extension/WidgetPageExtension.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/extension/WidgetPageExtension.php b/code/extension/WidgetPageExtension.php index 79efc9f..da07f1d 100644 --- a/code/extension/WidgetPageExtension.php +++ b/code/extension/WidgetPageExtension.php @@ -10,19 +10,19 @@ */ class WidgetPageExtension extends DataExtension { - static $db = array( + private static $db = array( 'InheritSideBar' => 'Boolean', ); - static $defaults = array( + private static $defaults = array( 'InheritSideBar' => true ); - static $has_one = array( + private static $has_one = array( 'SideBar' => 'WidgetArea' ); - function updateCMSFields(FieldList $fields) { + public function updateCMSFields(FieldList $fields) { $fields->addFieldToTab( "Root.Widgets", new CheckboxField("InheritSideBar", 'Inherit Sidebar From Parent') @@ -36,7 +36,7 @@ class WidgetPageExtension extends DataExtension { /** * @return WidgetArea */ - function SideBarView() { + public function SideBarView() { if( $this->owner->InheritSideBar && $this->owner->getParent() @@ -48,4 +48,4 @@ class WidgetPageExtension extends DataExtension { } } -} \ No newline at end of file +}