You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FormField::getValue() was added in #11422 when implementing FieldValidation on FormFields
getValue() is confusing alongside Value() which should really be called getFormattedValue() as the method will often return a formatted version $this->value, which seems like it's intended for use within templates. It also looks like it's used a lot inside FormFields as $this->Value(), $this->getValue() should probably be used instead.
Acceptance criteria
Rename FormField::Value() to FormField::getFormattedValue()
Update FormFIeld code that used $this->Value() to use $this->getValue() instead where appropriate
Check templates and use $FormattedValue instead of $Value
Changelog calls out that projects and modules will need to update their templates
The text was updated successfully, but these errors were encountered:
Split off from #11449 (comment)
FormField::getValue() was added in #11422 when implementing FieldValidation on FormFields
getValue() is confusing alongside Value() which should really be called getFormattedValue() as the method will often return a formatted version $this->value, which seems like it's intended for use within templates. It also looks like it's used a lot inside FormFields as $this->Value(), $this->getValue() should probably be used instead.
Acceptance criteria
$FormattedValue
instead of$Value
The text was updated successfully, but these errors were encountered: