-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC Rename FormField method #670
Open
emteknetnz
wants to merge
1
commit into
silverstripe:6.0
Choose a base branch
from
creative-commoners:pulls/6.0/rename-ffv
base: 6.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
DOC Rename FormField method #670
emteknetnz
wants to merge
1
commit into
silverstripe:6.0
from
creative-commoners:pulls/6.0/rename-ffv
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 tasks
0dbac2b
to
6ed834b
Compare
b55a8c0
to
e9de2e0
Compare
e9de2e0
to
aa18762
Compare
GuySartorelli
requested changes
Feb 3, 2025
@@ -1088,6 +1088,7 @@ As part of these changes [`ArrayList::find()`](api:SilverStripe\Model\List\Array | |||
- `SilverStripe\ORM\DataExtension`, `SilverStripe\CMS\Model\SiteTreeExtension`, and `SilverStripe\Admin\LeftAndMainExtension` have been removed. If you subclass any of these classes, you must now subclass [`Extension`](api:SilverStripe\Core\Extension) directly instead. | |||
- [`DBCurrency`](api:SilverStripe\ORM\FieldType\DBCurrency) will no longer parse numeric values contained in a string when calling `setValue()`. For instance "this is 50.29 dollars" will no longer be converted to "$50.29", instead its value will remain as "this is 50.29 dollars" and it will throw a validation exception if attempted to be written to the database. | |||
- The `SilverStripe\Model\List\ArrayList.default_case_sensitive` configuration property has been removed. This means the default case sensitivity of `ArrayList` is now the same as any other list which uses search filters. If you were using that configuration property, or you were relying on `ArrayList` being case sensitive by default, you should double check that your list filters are working the way you expect. See [search filters](/developer_guides/model/searchfilters/#modifiers) for details about case sensitivity in search filters. | |||
- `SilverStripe\Forms\FormField::Value()` has been split into to [`FormField::getValue()`](api:SilverStripe\Forms\FormField::getValue()) which usually returns an unmodified version of the field, and [`FormField::getFormattedValue()`](api:SilverStripe\Forms\FormField::getFormattedValue()) which is intended to be modified with things like localisation formatting. If you have overridden the `Value()` method in a subclass, you will need to update the method name, usuall to `getFormattedValue()`. If you have use `$Value` in a template to get the value of a form field, you will also need to update it to `$FormattedValue`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
- `SilverStripe\Forms\FormField::Value()` has been split into to [`FormField::getValue()`](api:SilverStripe\Forms\FormField::getValue()) which usually returns an unmodified version of the field, and [`FormField::getFormattedValue()`](api:SilverStripe\Forms\FormField::getFormattedValue()) which is intended to be modified with things like localisation formatting. If you have overridden the `Value()` method in a subclass, you will need to update the method name, usuall to `getFormattedValue()`. If you have use `$Value` in a template to get the value of a form field, you will also need to update it to `$FormattedValue`. | |
- `SilverStripe\Forms\FormField::Value()` has been split into to [`FormField::getValue()`](api:SilverStripe\Forms\FormField::getValue()) which usually returns an unmodified version of the value, and [`FormField::getFormattedValue()`](api:SilverStripe\Forms\FormField::getFormattedValue()) which is intended to be modified with things like localisation formatting and will be displayed to users. If you have overridden the `Value()` method in a subclass, you will need to update the method name to one of these, depending on the purpose of the custom functionality. If you use `$Value` in a template to get the value of a form field, you will need to update it to `$FormattedValue`. |
This feels like it probably deserves its own section (I'd guess it's a fairly high-traffic method, and this is a fairly substantial amount of information) - but I won't block merging if you think it should stay here as a footnote.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue silverstripe/silverstripe-framework#11468