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()