diff --git a/src/Extensions/FileSubsites.php b/src/Extensions/FileSubsites.php index ccbe183b..b2e47f85 100644 --- a/src/Extensions/FileSubsites.php +++ b/src/Extensions/FileSubsites.php @@ -107,7 +107,7 @@ protected function onAfterUpload() $this->owner->write(); } - public function canEdit($member = null) + protected function canEdit($member = null) { // Opt out of making opinions if no subsite ID is set yet if (!$this->owner->SubsiteID) { diff --git a/src/Extensions/GroupSubsites.php b/src/Extensions/GroupSubsites.php index 469622dc..e214f3c3 100644 --- a/src/Extensions/GroupSubsites.php +++ b/src/Extensions/GroupSubsites.php @@ -43,7 +43,7 @@ class GroupSubsites extends DataExtension implements PermissionProvider /** * Migrations for GroupSubsites data. */ - public function requireDefaultRecords() + protected function onRequireDefaultRecords() { if (!$this->owner) { return; diff --git a/src/Extensions/LeftAndMainSubsites.php b/src/Extensions/LeftAndMainSubsites.php index 733b092d..2c9eb3ba 100644 --- a/src/Extensions/LeftAndMainSubsites.php +++ b/src/Extensions/LeftAndMainSubsites.php @@ -41,7 +41,7 @@ class LeftAndMainSubsites extends LeftAndMainExtension */ private static $treats_subsite_0_as_global = false; - public function init() + protected function onInit() { Requirements::css('silverstripe/subsites:client/dist/styles/LeftAndMain_Subsites.css'); Requirements::javascript('silverstripe/subsites:client/dist/js/LeftAndMain_Subsites.js'); @@ -223,7 +223,7 @@ public function shouldChangeSubsite($adminClass, $recordSubsiteID, $currentSubsi * * @param Member $member */ - public function canAccess(Member $member = null) + protected function canAccess(Member $member = null) { if (!$member) { $member = Security::getCurrentUser(); @@ -253,7 +253,7 @@ public function canAccess(Member $member = null) */ public function alternateAccessCheck(Member $member = null) { - return $this->owner->canAccess($member); + return $this->canAccess($member); } /** @@ -345,7 +345,7 @@ protected function onBeforeInit() // SECOND, check if we need to change subsites due to lack of permissions. - if (!$this->owner->canAccess()) { + if (!$this->canAccess()) { $member = Security::getCurrentUser(); // Current section is not accessible, try at least to stick to the same subsite. diff --git a/src/Extensions/SiteTreeSubsites.php b/src/Extensions/SiteTreeSubsites.php index 94008cd7..2d199b4f 100644 --- a/src/Extensions/SiteTreeSubsites.php +++ b/src/Extensions/SiteTreeSubsites.php @@ -316,7 +316,7 @@ protected function alternateSiteConfig() * @param Member|null $member * @return bool|null */ - public function canEdit($member = null) + protected function canEdit($member = null) { if (!$member) { $member = Security::getCurrentUser(); @@ -351,7 +351,7 @@ public function canEdit($member = null) * @param null $member * @return bool */ - public function canDelete($member = null) + protected function canDelete($member = null) { if (!$member && $member !== false) { $member = Security::getCurrentUser(); @@ -364,7 +364,7 @@ public function canDelete($member = null) * @param null $member * @return bool */ - public function canAddChildren($member = null) + protected function canAddChildren($member = null) { if (!$member && $member !== false) { $member = Security::getCurrentUser(); @@ -377,7 +377,7 @@ public function canAddChildren($member = null) * @param Member|null $member * @return bool|null */ - public function canPublish($member = null) + protected function canPublish($member = null) { if (!$member && $member !== false) { $member = Security::getCurrentUser(); @@ -445,7 +445,7 @@ protected function updatePreviewLink(&$link, $action = null) * @param $tags * @return string */ - public function MetaTags(&$tags) + protected function updateMetaTags(&$tags) { if ($this->owner->SubsiteID) { $tags .= '\n"; @@ -527,7 +527,7 @@ protected function cacheKeyComponent() * @param Member $member * @return boolean|null */ - public function canCreate($member = null) + protected function canCreate($member = null) { // Typically called on a singleton, so we're not using the Subsite() relation $subsite = Subsite::currentSubsite();