From 62d9fbcd5ab1dc182c2b90dcc3c24c86a396c2af Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 16 May 2024 17:30:44 +1200 Subject: [PATCH] API Set extension hook implementation visibility to protected --- code/FrameworkTestRole.php | 2 +- code/elemental/ElementContentExtension.php | 4 ++-- code/elemental/NumericFieldExtension.php | 2 +- code/linkfield/Extensions/CompanyExtension.php | 2 +- code/linkfield/Extensions/ElementContentExtension.php | 2 +- code/linkfield/Extensions/LinkPageExtension.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/FrameworkTestRole.php b/code/FrameworkTestRole.php index 1d8da90..dbf270f 100644 --- a/code/FrameworkTestRole.php +++ b/code/FrameworkTestRole.php @@ -16,7 +16,7 @@ class FrameworkTestRole extends DataExtension 'FavouritePage' => 'SilverStripe\\CMS\\Model\\SiteTree', ); - public function updateCMSFields(FieldList $fields) + protected function updateCMSFields(FieldList $fields) { $fields->addFieldToTab( 'Root.Main', diff --git a/code/elemental/ElementContentExtension.php b/code/elemental/ElementContentExtension.php index 06145f7..d813fdd 100644 --- a/code/elemental/ElementContentExtension.php +++ b/code/elemental/ElementContentExtension.php @@ -40,12 +40,12 @@ class ElementContentExtension extends Extension } } - public function updateCMSCompositeValidator(CompositeValidator $compositeValidator) + protected function updateCMSCompositeValidator(CompositeValidator $compositeValidator) { $compositeValidator->addValidator(new RequiredFields(['Title', 'MyPageID', 'MyFile'])); } - public function updateCMSFields(FieldList $fields) + protected function updateCMSFields(FieldList $fields) { $fields->removeByName('HTML'); $fields->addFieldToTab('Root.Main', TextField::create('MyField', 'My Field')); diff --git a/code/elemental/NumericFieldExtension.php b/code/elemental/NumericFieldExtension.php index 3fba91c..358c8e8 100644 --- a/code/elemental/NumericFieldExtension.php +++ b/code/elemental/NumericFieldExtension.php @@ -10,7 +10,7 @@ use SilverStripe\Core\Extension; */ class NumericFieldExtension extends Extension { - public function updateValidationResult($result, $validator) + protected function updateValidationResult($result, $validator) { if ($this->owner->Value() == 1) { $validator->validationError($this->owner->getName(), 'This field cannot be 1'); diff --git a/code/linkfield/Extensions/CompanyExtension.php b/code/linkfield/Extensions/CompanyExtension.php index c960930..b6303b6 100644 --- a/code/linkfield/Extensions/CompanyExtension.php +++ b/code/linkfield/Extensions/CompanyExtension.php @@ -34,7 +34,7 @@ class CompanyExtension extends Extension 'ManyCompanyWebSiteLink', ]; - public function updateCMSFields(FieldList $fields) + protected function updateCMSFields(FieldList $fields) { $fields->removeByName(['CompanyWebSiteLinkID', 'ManyCompanyWebSiteLinkID']); diff --git a/code/linkfield/Extensions/ElementContentExtension.php b/code/linkfield/Extensions/ElementContentExtension.php index ca02ac6..d7a43a1 100644 --- a/code/linkfield/Extensions/ElementContentExtension.php +++ b/code/linkfield/Extensions/ElementContentExtension.php @@ -37,7 +37,7 @@ class ElementContentExtension extends Extension 'ManyLinks', ]; - public function updateCMSFields($fields) + protected function updateCMSFields($fields) { $fields->removeByName(['OneLinkID', 'ManyLinks']); $fields->addFieldsToTab( diff --git a/code/linkfield/Extensions/LinkPageExtension.php b/code/linkfield/Extensions/LinkPageExtension.php index b564c34..9e9aa98 100644 --- a/code/linkfield/Extensions/LinkPageExtension.php +++ b/code/linkfield/Extensions/LinkPageExtension.php @@ -36,7 +36,7 @@ class LinkPageExtension extends Extension 'HasManyLinks', ]; - public function updateCMSFields(FieldList $fields) + protected function updateCMSFields(FieldList $fields) { $fields->removeByName(['Content', 'HasOneLinkID', 'HasManyLinksID']);