Skip to content

Commit

Permalink
API Deprecate FormField Value
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jan 23, 2025
1 parent 0aa00a6 commit 8bcc796
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Forms/FormField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 3 additions & 0 deletions src/Forms/HTMLEditor/HTMLEditorField.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataObjectInterface;
use Exception;
use SilverStripe\Dev\Deprecation;
use SilverStripe\View\Parsers\HTMLValue;

/**
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 8bcc796

Please sign in to comment.