From 6adf5893c95d7be2cbec9cb5696b8b6f7c8d24d2 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 20 May 2024 16:57:56 +1200 Subject: [PATCH] API Set extension hook implementation visibility to protected --- src/Model/BlogFilter.php | 2 +- src/Model/BlogMemberExtension.php | 4 ++-- src/Model/BlogPost.php | 4 ++-- src/Model/BlogPostFeaturedExtension.php | 2 +- src/Model/BlogPostFilter.php | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Model/BlogFilter.php b/src/Model/BlogFilter.php index fe2e642..7dc106b 100644 --- a/src/Model/BlogFilter.php +++ b/src/Model/BlogFilter.php @@ -90,7 +90,7 @@ class BlogFilter extends Lumberjack /** * {@inheritdoc} */ - public function updateCMSFields(FieldList $fields) + protected function updateCMSFields(FieldList $fields) { $excluded = $this->owner->getExcludedSiteTreeClassNames(); diff --git a/src/Model/BlogMemberExtension.php b/src/Model/BlogMemberExtension.php index 0be5920..573f0e6 100644 --- a/src/Model/BlogMemberExtension.php +++ b/src/Model/BlogMemberExtension.php @@ -54,7 +54,7 @@ class BlogMemberExtension extends DataExtension /** * {@inheritdoc} */ - public function onBeforeWrite() + protected function onBeforeWrite() { $count = 1; @@ -108,7 +108,7 @@ class BlogMemberExtension extends DataExtension /** * {@inheritdoc} */ - public function updateCMSFields(FieldList $fields) + protected function updateCMSFields(FieldList $fields) { $fields->removeByName('URLSegment'); diff --git a/src/Model/BlogPost.php b/src/Model/BlogPost.php index a14824b..38cdb55 100644 --- a/src/Model/BlogPost.php +++ b/src/Model/BlogPost.php @@ -491,7 +491,7 @@ class BlogPost extends Page * * Update the PublishDate to now if the BlogPost would otherwise be published without a date. */ - public function onBeforePublish() + protected function onBeforePublish() { /** * @var DBDatetime $publishDate @@ -509,7 +509,7 @@ class BlogPost extends Page * * Sets blog relationship on all categories and tags assigned to this post. */ - public function onAfterWrite() + protected function onAfterWrite() { parent::onAfterWrite(); diff --git a/src/Model/BlogPostFeaturedExtension.php b/src/Model/BlogPostFeaturedExtension.php index e98dd0d..b309128 100644 --- a/src/Model/BlogPostFeaturedExtension.php +++ b/src/Model/BlogPostFeaturedExtension.php @@ -23,7 +23,7 @@ class BlogPostFeaturedExtension extends DataExtension /** * {@inheritdoc} */ - public function updateCMSFields(FieldList $fields) + protected function updateCMSFields(FieldList $fields) { // Add the checkbox in. $fields->addFieldToTab( diff --git a/src/Model/BlogPostFilter.php b/src/Model/BlogPostFilter.php index f589654..474a052 100644 --- a/src/Model/BlogPostFilter.php +++ b/src/Model/BlogPostFilter.php @@ -27,7 +27,7 @@ class BlogPostFilter extends DataExtension * @param SQLSelect $query * @param DataQuery $query */ - public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) + protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) { if (Controller::has_curr() && Controller::curr() instanceof LeftAndMain) { @@ -60,7 +60,7 @@ class BlogPostFilter extends DataExtension * @param DataQuery $dataQuery * @param DataObject $dataObject */ - public function augmentLoadLazyFields(SQLSelect &$query, DataQuery &$dataQuery = null, $dataObject) + protected function augmentLoadLazyFields(SQLSelect &$query, DataQuery &$dataQuery = null, $dataObject) { $blogPostTable = DataObject::getSchema()->tableName(BlogPost::class); $dataQuery->innerJoin(