diff --git a/src/Extensions/BaseElementSubsites.php b/src/Extensions/BaseElementSubsites.php index ee2a6b37..40b3a435 100644 --- a/src/Extensions/BaseElementSubsites.php +++ b/src/Extensions/BaseElementSubsites.php @@ -20,7 +20,7 @@ class BaseElementSubsites extends DataExtension * @param string|null $action * @return string */ - public function updatePreviewLink(&$link) + protected function updatePreviewLink(&$link) { // Get subsite ID from the element or from its page. Defaults to 0 automatically. $subsiteID = $this->owner->SubsiteID; diff --git a/src/Extensions/CMSPageAddControllerExtension.php b/src/Extensions/CMSPageAddControllerExtension.php index ad7c87c2..afdcdacd 100644 --- a/src/Extensions/CMSPageAddControllerExtension.php +++ b/src/Extensions/CMSPageAddControllerExtension.php @@ -13,7 +13,7 @@ */ class CMSPageAddControllerExtension extends Extension { - public function updatePageOptions(FieldList $fields) + protected function updatePageOptions(FieldList $fields) { $fields->push(HiddenField::create('SubsiteID', 'SubsiteID', SubsiteState::singleton()->getSubsiteId())); } diff --git a/src/Extensions/ErrorPageSubsite.php b/src/Extensions/ErrorPageSubsite.php index 2dac6edd..ab16cf11 100644 --- a/src/Extensions/ErrorPageSubsite.php +++ b/src/Extensions/ErrorPageSubsite.php @@ -28,7 +28,7 @@ class ErrorPageSubsite extends DataExtension * @param string $name * @param int $statusCode */ - public function updateErrorFilename(&$name, &$statusCode) + protected function updateErrorFilename(&$name, &$statusCode) { $static_filepath = Config::inst()->get($this->owner->ClassName, 'static_filepath'); $subdomainPart = ''; diff --git a/src/Extensions/FileSubsites.php b/src/Extensions/FileSubsites.php index 454ae7bf..f0fe1ffd 100644 --- a/src/Extensions/FileSubsites.php +++ b/src/Extensions/FileSubsites.php @@ -49,7 +49,7 @@ public function alternateTreeTitle() * @param SQLSelect $query * @param DataQuery|null $dataQuery */ - public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) + protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) { if (Subsite::$disable_subsite_filter) { return; @@ -96,7 +96,7 @@ public function onBeforeWrite() } } - public function onAfterUpload() + protected function onAfterUpload() { // If we have a parent, use it's subsite as our subsite if ($this->owner->Parent()) { @@ -132,7 +132,7 @@ public function canEdit($member = null) * * @return string */ - public function cacheKeyComponent() + protected function cacheKeyComponent() { return 'subsite-' . SubsiteState::singleton()->getSubsiteId(); } diff --git a/src/Extensions/FolderFormFactoryExtension.php b/src/Extensions/FolderFormFactoryExtension.php index b1feabd7..e4071212 100644 --- a/src/Extensions/FolderFormFactoryExtension.php +++ b/src/Extensions/FolderFormFactoryExtension.php @@ -18,7 +18,7 @@ class FolderFormFactoryExtension extends Extension * Add subsites-specific fields to the folder editor. * @param FieldList $fields */ - public function updateFormFields(FieldList $fields) + protected function updateFormFields(FieldList $fields) { $sites = Subsite::accessible_sites('CMS_ACCESS_AssetAdmin'); $values = []; diff --git a/src/Extensions/GroupSubsites.php b/src/Extensions/GroupSubsites.php index 9ebedb09..d750bc1b 100644 --- a/src/Extensions/GroupSubsites.php +++ b/src/Extensions/GroupSubsites.php @@ -78,7 +78,7 @@ public function requireDefaultRecords() } } - public function updateCMSFields(FieldList $fields) + protected function updateCMSFields(FieldList $fields) { if ($this->owner->canEdit()) { // i18n tab @@ -132,7 +132,7 @@ public function updateCMSFields(FieldList $fields) * * @param string $title */ - public function updateTreeTitle(&$title) + protected function updateTreeTitle(&$title) { if ($this->owner->AccessAllSubsites) { $title = _t(__CLASS__ . '.GlobalGroup', 'global group'); @@ -148,7 +148,7 @@ public function updateTreeTitle(&$title) * @param SQLSelect $query * @param DataQuery|null $dataQuery */ - public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) + protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) { if (Subsite::$disable_subsite_filter) { return; diff --git a/src/Extensions/HintsCacheKeyExtension.php b/src/Extensions/HintsCacheKeyExtension.php index 19ece6c4..dba88efd 100644 --- a/src/Extensions/HintsCacheKeyExtension.php +++ b/src/Extensions/HintsCacheKeyExtension.php @@ -16,7 +16,7 @@ */ class HintsCacheKeyExtension extends Extension { - public function updateHintsCacheKey(&$baseKey) + protected function updateHintsCacheKey(&$baseKey) { $baseKey .= '_Subsite:' . SubsiteState::singleton()->getSubsiteId(); } diff --git a/src/Extensions/LeftAndMainSubsites.php b/src/Extensions/LeftAndMainSubsites.php index 147ef280..733b092d 100644 --- a/src/Extensions/LeftAndMainSubsites.php +++ b/src/Extensions/LeftAndMainSubsites.php @@ -56,7 +56,7 @@ public function getCMSTreeTitle() return $subsite ? Convert::raw2xml($subsite->Title) : _t(__CLASS__.'.SITECONTENTLEFT', 'Site Content'); } - public function updatePageOptions(&$fields) + protected function updatePageOptions(&$fields) { $fields->push(HiddenField::create('SubsiteID', 'SubsiteID', SubsiteState::singleton()->getSubsiteId())); } @@ -266,7 +266,7 @@ public function alternateAccessCheck(Member $member = null) * fully re-synchronised with the internal session. This is better than risking some panels * showing data from another subsite. */ - public function onBeforeInit() + protected function onBeforeInit() { $request = Controller::curr()->getRequest(); $session = $request->getSession(); @@ -381,13 +381,13 @@ public function onBeforeInit() return; } - public function augmentNewSiteTreeItem(&$item) + protected function augmentNewSiteTreeItem(&$item) { $request = Controller::curr()->getRequest(); $item->SubsiteID = $request->postVar('SubsiteID') ?: SubsiteState::singleton()->getSubsiteId(); } - public function onAfterSave($record) + protected function onAfterSave($record) { if ($record->hasMethod('NormalRelated') && ($record->NormalRelated() || $record->ReverseRelated())) { $this->owner->response->addHeader( diff --git a/src/Extensions/SiteConfigSubsites.php b/src/Extensions/SiteConfigSubsites.php index 4f768ae5..0b0ffdf2 100644 --- a/src/Extensions/SiteConfigSubsites.php +++ b/src/Extensions/SiteConfigSubsites.php @@ -29,7 +29,7 @@ class SiteConfigSubsites extends DataExtension * @param SQLSelect $query * @param DataQuery|null $dataQuery */ - public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) + protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) { if (Subsite::$disable_subsite_filter) { return; @@ -70,12 +70,12 @@ public function onBeforeWrite() /** * Return a piece of text to keep DataObject cache keys appropriately specific */ - public function cacheKeyComponent() + protected function cacheKeyComponent() { return 'subsite-' . SubsiteState::singleton()->getSubsiteId(); } - public function updateCMSFields(FieldList $fields) + protected function updateCMSFields(FieldList $fields) { $fields->push(HiddenField::create('SubsiteID', 'SubsiteID', SubsiteState::singleton()->getSubsiteId())); } diff --git a/src/Extensions/SiteTreeSubsites.php b/src/Extensions/SiteTreeSubsites.php index 8db1a580..1175e81c 100644 --- a/src/Extensions/SiteTreeSubsites.php +++ b/src/Extensions/SiteTreeSubsites.php @@ -63,7 +63,7 @@ public function isMainSite() * @param SQLSelect $query * @param DataQuery $dataQuery */ - public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) + protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) { if (Subsite::$disable_subsite_filter) { return; @@ -107,7 +107,7 @@ public function onBeforeWrite() parent::onBeforeWrite(); } - public function updateCMSFields(FieldList $fields) + protected function updateCMSFields(FieldList $fields) { $subsites = Subsite::accessible_sites('CMS_ACCESS_CMSMain'); if ($subsites && $subsites->count()) { @@ -225,7 +225,7 @@ public function duplicateToSubsitePrep($subsiteID, $includeChildren) /** * When duplicating a page, assign the current subsite ID from the state */ - public function onBeforeDuplicate() + protected function onBeforeDuplicate() { $subsiteId = SubsiteState::singleton()->getSubsiteId(); if ($subsiteId !== null) { @@ -290,7 +290,7 @@ public function duplicateSubsiteRelations($originalPage) /** * @return SiteConfig */ - public function alternateSiteConfig() + protected function alternateSiteConfig() { if (!$this->owner->SubsiteID) { return false; @@ -433,7 +433,7 @@ public function alternateAbsoluteLink($action = null) * @param string|null $action * @return string */ - public function updatePreviewLink(&$link, $action = null) + protected function updatePreviewLink(&$link, $action = null) { $url = Director::absoluteURL($this->owner->Link($action)); $link = HTTP::setGetVar('SubsiteID', $this->owner->SubsiteID, $url); @@ -454,7 +454,7 @@ public function MetaTags(&$tags) return $tags; } - public function augmentSyncLinkTracking() + protected function augmentSyncLinkTracking() { // Set LinkTracking appropriately $links = HTTP::getLinksIn($this->owner->Content); @@ -502,7 +502,7 @@ public function augmentSyncLinkTracking() * * @return null|bool Either true or false, or null to not influence result */ - public function augmentValidURLSegment() + protected function augmentValidURLSegment() { // If this page is being filtered in the current subsite, then no custom validation query is required. $subsiteID = SubsiteState::singleton()->getSubsiteId(); @@ -518,7 +518,7 @@ public function augmentValidURLSegment() /** * Return a piece of text to keep DataObject cache keys appropriately specific */ - public function cacheKeyComponent() + protected function cacheKeyComponent() { return 'subsite-' . SubsiteState::singleton()->getSubsiteId(); }