From 27fd72e2a840b5b7383cca5bcd55cf7401558936 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 22 May 2024 10:50:50 +1200 Subject: [PATCH] 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()) {