From ff0cbd6f8710a2209d6a88e7af1e6bef831808f8 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 27 Aug 2024 15:39:18 +1200 Subject: [PATCH] API Standardise extension hooks (#1237) --- src/Extensions/ElementalAreasExtension.php | 2 +- src/Extensions/ElementalPageExtension.php | 2 +- tests/Src/ValidationFailedExtension.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Extensions/ElementalAreasExtension.php b/src/Extensions/ElementalAreasExtension.php index ab90faba..4ecfb9e6 100644 --- a/src/Extensions/ElementalAreasExtension.php +++ b/src/Extensions/ElementalAreasExtension.php @@ -298,7 +298,7 @@ public function ensureElementalAreasExist($elementalAreaRelations) * * @return void */ - public function requireDefaultRecords() + protected function onRequireDefaultRecords() { if (!$this->supportsElemental()) { return; diff --git a/src/Extensions/ElementalPageExtension.php b/src/Extensions/ElementalPageExtension.php index 7c4fbb4b..bcda21f6 100644 --- a/src/Extensions/ElementalPageExtension.php +++ b/src/Extensions/ElementalPageExtension.php @@ -119,7 +119,7 @@ protected function updateAnchorsOnPage(array &$anchors): void }); } - public function MetaTags(&$tags) + protected function updateMetaTags(&$tags) { if (!Controller::has_curr()) { return; diff --git a/tests/Src/ValidationFailedExtension.php b/tests/Src/ValidationFailedExtension.php index e1e99167..ce3e548f 100644 --- a/tests/Src/ValidationFailedExtension.php +++ b/tests/Src/ValidationFailedExtension.php @@ -11,7 +11,7 @@ class ValidationFailedExtension extends Extension implements TestOnly { public const INVALID_TITLE_MESSAGE = '%s is invalid'; - public function validate(ValidationResult $result) + protected function updateValidate(ValidationResult $result) { $result->addFieldError('Title', sprintf(static::INVALID_TITLE_MESSAGE, ClassInfo::shortName($this->owner))); }