Skip to content
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

settigns -> settings #314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fields-change/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ In order to achieve the described behavior a custom implementation of the [**Fie

Its method [**canProcess()**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldchangeservice.html#canprocess) is used to determine whether the service should process field changes based on the content type name. This is useful when several content types has fields with the same name, but you want to process changes only for a specific type. In the sample provided the service only handles changes for the newsitems content type.

The [**processChange()**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldchangeservice.html#processchange) method is where the main logic takes place. Its is called every time a field is being updated. The method accepts 3 parameters - the name of the changed field, the new value of the field and an array of [**FieldWrapper**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldwrapper.html) that contains all fields. The [**FieldWrapper**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldwrapper.html) contains a [**FieldModel**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldmodel.html) property, which contains information about the [**key**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldmodel.html#key) of the field and its [**settigns**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldmodel.html#settings). Usually using the key property you can find the field that you want to change and then update either its [**settigns**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldmodel.html#settings) or its value (using the [**writeValue()**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldwrapper.html#writevalue) method).
The [**processChange()**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldchangeservice.html#processchange) method is where the main logic takes place. Its is called every time a field is being updated. The method accepts 3 parameters - the name of the changed field, the new value of the field and an array of [**FieldWrapper**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldwrapper.html) that contains all fields. The [**FieldWrapper**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldwrapper.html) contains a [**FieldModel**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldmodel.html) property, which contains information about the [**key**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldmodel.html#key) of the field and its [**settings**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldmodel.html#settings). Usually using the key property you can find the field that you want to change and then update either its [**settings**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldmodel.html#settings) or its value (using the [**writeValue()**](http://admin-app-extensions-docs.sitefinity.site/interfaces/fieldwrapper.html#writevalue) method).