From add7e35ee24bc25bd0331fcda9830f2bf7e3d050 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 22 May 2024 10:50:38 +1200 Subject: [PATCH 1/2] API Set extension hook implementation visibility to protected --- src/Extension/FluentReadVersionsExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Extension/FluentReadVersionsExtension.php b/src/Extension/FluentReadVersionsExtension.php index 92a95232..13224180 100644 --- a/src/Extension/FluentReadVersionsExtension.php +++ b/src/Extension/FluentReadVersionsExtension.php @@ -22,7 +22,7 @@ class FluentReadVersionsExtension extends Extension * * @param DataList &$list */ - public function updateList(DataList &$list) + protected function updateList(DataList &$list) { /** @var DataObject $singleton */ $singleton = Injector::inst()->get($list->dataClass()); From 27fd72e2a840b5b7383cca5bcd55cf7401558936 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 22 May 2024 10:50:50 +1200 Subject: [PATCH 2/2] DOC Update extension hook examples to be protected --- docs/en/dataobjects.md | 2 +- docs/en/scenarios.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/dataobjects.md b/docs/en/dataobjects.md index 8499e86c..616b6f5c 100644 --- a/docs/en/dataobjects.md +++ b/docs/en/dataobjects.md @@ -78,7 +78,7 @@ use TractorCow\Fluent\Extension\FluentExtension; class PlayerExtension extends FluentExtension { - public function updateCMSFields(FieldList $fields) + protected function updateCMSFields(FieldList $fields) { $fields->removeByName('SomeIrrelevantField'); parent::updateCMSFields($fields); diff --git a/docs/en/scenarios.md b/docs/en/scenarios.md index 8702de49..7b0ef5d0 100644 --- a/docs/en/scenarios.md +++ b/docs/en/scenarios.md @@ -128,7 +128,7 @@ class SiteTreeFluentExtension extends SiteTreeExtension * @param SQLSelect $query * @param DataQuery|null $dataQuery */ - public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) + protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) { // We only want to apply this logic on the frontend. if (!FluentState::singleton()->getIsFrontend()) {