From 7ef8cbd9e58e2817e26cdc0faafa417c0b4f93ac Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 14 Jan 2025 16:16:57 +1300 Subject: [PATCH] API Rename FormField Value to getFormattedValue --- code/Forms/SiteTreeURLSegmentField.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/Forms/SiteTreeURLSegmentField.php b/code/Forms/SiteTreeURLSegmentField.php index 75d582c01a..81f4dc23ad 100644 --- a/code/Forms/SiteTreeURLSegmentField.php +++ b/code/Forms/SiteTreeURLSegmentField.php @@ -42,7 +42,7 @@ class SiteTreeURLSegmentField extends TextField 'suggest' ]; - public function Value() + public function getFormattedValue(): string { return rawurldecode($this->value ?? ''); } @@ -96,8 +96,8 @@ public function suggest($request) public function getPage() { $idField = $this->getForm()->Fields()->dataFieldByName('ID'); - return ($idField && $idField->Value()) - ? SiteTree::get()->byID($idField->Value()) + return ($idField && $idField->getValue()) + ? SiteTree::get()->byID($idField->getValue()) : SiteTree::singleton(); } @@ -171,7 +171,7 @@ public function Type() public function getURL() { - return Controller::join_links($this->getURLPrefix(), $this->Value(), $this->getURLSuffix()); + return Controller::join_links($this->getURLPrefix(), $this->getValue(), $this->getURLSuffix()); } public function performReadonlyTransformation()