From 8bcc79613a8702ddaf49e4c391241e4b9f138df3 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 23 Jan 2025 13:11:04 +1300 Subject: [PATCH] API Deprecate FormField Value --- src/Forms/FormField.php | 2 ++ src/Forms/HTMLEditor/HTMLEditorField.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/Forms/FormField.php b/src/Forms/FormField.php index 00eef25510c..385ef4f6ec6 100644 --- a/src/Forms/FormField.php +++ b/src/Forms/FormField.php @@ -448,9 +448,11 @@ public function getInputType() * * @see FormField::setSubmittedValue() * @return mixed + * @deprecated 5.4.0 Will be replace with getValue() and getFormattedValue() */ public function Value() { + Deprecation::notice('5.4.0', 'Will be replace with getValue() and getFormattedValue()'); return $this->value; } diff --git a/src/Forms/HTMLEditor/HTMLEditorField.php b/src/Forms/HTMLEditor/HTMLEditorField.php index 90c3fad75c1..7eb1cb0413b 100644 --- a/src/Forms/HTMLEditor/HTMLEditorField.php +++ b/src/Forms/HTMLEditor/HTMLEditorField.php @@ -8,6 +8,7 @@ use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataObjectInterface; use Exception; +use SilverStripe\Dev\Deprecation; use SilverStripe\View\Parsers\HTMLValue; /** @@ -189,9 +190,11 @@ public function getSchemaStateDefaults() * Return value with all values encoded in html entities * * @return string Raw HTML + * @deprecated 5.4.0 Will be replaced with FormattedValueEntities() */ public function ValueEntities() { + Deprecation::noticeWithNoReplacment('5.4.0', 'Will be replaced with FormattedValueEntities()'); $entities = get_html_translation_table(HTML_ENTITIES); foreach ($entities as $key => $value) {