Important

You are browsing the documentation for version 4.1 of OroCommerce, OroCRM and OroPlatform, which is no longer maintained. Read version 5.1 (the latest LTS version) of the Oro documentation to get up-to-date information.

See our Release Process documentation for more information on the currently supported and upcoming releases.

Additional Serializable Fields

Integration entity contains two additional serializable fields that allow developers to store platform specific settings there. Those fields are synchronization settings and mapping settings. They could be retrieved using getters getSynchronizationSettings() and getMappingSettings() respectively.

Note

doctrine2 will not update object type fields if values were changed by reference, due to this getters return cloned objects.

In order to allow putting configuration fields into integration creation form the integrations.yml config file type was added. The root node should be integrations and the form configuration should be placed under the form node.

Example

1 integrations:
2     form:
3         synchronization_settings: # form name (now synchronization_settings and mapping_settings are available)
4             isTwoWaySyncEnabled:  # field name
5                 type: checkbox    # form field type
6                 options:          # form options
7                     label:    oro.integration.integration.is_two_way_sync_enabled.label
8                     required: false
9                 applicable: [some_integration_type]  # on which integration types this setting should be shown

This configuration will be resolved by SystemAwareResolver so any node can contain DI service calls or constants. For example, if you want to bring dynamic behavior to the applicable node you can put service call there, $channelType$`will be in the resolver context. In this case, string `applicable: @some.service->methodOfService($channelType$) will invoke function methodOfService in the class registered in the DI as some.service.