Important

You are browsing the documentation for version 3.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.

System Configuration

Filename

system_configuration.yml

Root Node

system_configuration

Options

The system_configuration.yml file defines all the configuration options a bundle exposes which can be modified by the user in the system settings menu.

The following example shows a complete working configuration taken from the system_configuration.yml file of the ActivityListBundle from OroPlatform:

 1# src/Oro/Bundle/ActivityListBundle/Resources/config/oro/system_configuration.yml
 2system_configuration:
 3    groups:
 4        activity_list_settings:
 5            title:  oro.activitylist.system_configuration.activity_list.label
 6
 7    fields:
 8        oro_activity_list.sorting_field:
 9            data_type: string
10            type: choice
11            options:
12                label: oro.activitylist.system_configuration.fields.sorting_field.label
13                choices:
14                    createdAt: oro.activitylist.system_configuration.fields.sorting_field.choices.createdAt
15                    updatedAt: oro.activitylist.system_configuration.fields.sorting_field.choices.updatedAt
16                constraints:
17                    - NotBlank: ~
18        oro_activity_list.sorting_direction:
19            data_type: string
20            type: choice
21            options:
22                label: oro.activitylist.system_configuration.fields.sorting_direction.label
23                choices:
24                    DESC: oro.activitylist.system_configuration.fields.sorting_direction.choices.DESC
25                    ASC: oro.activitylist.system_configuration.fields.sorting_direction.choices.ASC
26                constraints:
27                    - NotBlank: ~
28        oro_activity_list.per_page:
29            data_type: integer
30            type: choice
31            options:
32                label: oro.activitylist.system_configuration.fields.per_page.label
33                choices:
34                    10:     10
35                    25:     25
36                    50:     50
37                    100:    100
38                constraints:
39                    - NotBlank: ~
40        oro_activity_list.grouping:
41            data_type: boolean
42            type: choice
43            options:
44                label: oro.activitylist.system_configuration.email_threads.use_threads_in_activities.label
45                choices:
46                    - oro.activitylist.system_configuration.email_threads.use_threads_in_activities.choices.non_threaded.label
47                    - oro.activitylist.system_configuration.email_threads.use_threads_in_activities.choices.threaded.label
48
49    tree:
50        system_configuration:
51            platform:
52                children:
53                    general_setup:
54                        children:
55                            look_and_feel:
56                                children:
57                                    activity_list_settings:
58                                        children:
59                                            - oro_activity_list.sorting_field
60                                            - oro_activity_list.sorting_direction
61                                            - oro_activity_list.per_page
62                            email_configuration:
63                                children:
64                                    email_threads:
65                                        children:
66                                            - oro_activity_list.grouping
67
68    api_tree:
69        activity_list:
70            oro_activity_list.sorting_field: ~
71            oro_activity_list.sorting_direction: ~
72            oro_activity_list.per_page: ~
73        email_threads:
74            oro_activity_list.grouping: ~

api_tree

type: map

The api_tree block is used to define which configuration options will be configurable through the API. Nested maps can be used to create logical groups of options:

1system_configuration:
2    api_tree:
3        activity_list:
4            oro_activity_list.sorting_field: ~
5            oro_activity_list.sorting_direction: ~
6            oro_activity_list.per_page: ~
7        email_threads:
8            oro_activity_list.grouping: ~

fields

type: map

This option specifies the list of Configuration keys the bundle provides. Each key is the name of a Configuration option. For each key you have to pass a map that describes how the option can be configured by the user. The available options for each key are:

data_type

type: string

The type of data that can be stored as the option value. Supported data types are array, boolean, or string.

options

type: map

The form type options. The options being available depend on the actual form type.

type

type: string

The name of the form type that will be rendered in the user interface to change the option value.

groups

type: map

You can use this option to create configuration groups. The system_configuration.yml files of all bundles can refer to any group defined by any bundle to structure trees of config options. The following options exist to define a group:

icon

type: string

The name of a Font Awesome Icon (prefixed with the string icon-) that will be displayed next to the group name.

page_reload

type: boolean (default: false)

By default, JavaScript is used to open a group in the configuration tree. Set this option to true to force a full page reload.

title

type: string

The name of the group. The configured string will be translated before being displayed in the user interface.

tree

type: map

This option creates a hierarchical tree of configuration options as they will be presented in the user interface. Each key of the map refers to either the name of a group or the name of a configuration option. The values are maps that configure how each node is rendered in the UI. Available options for each node are:

children

type: list|map

The names of child nodes (fields or groups) mapped to their configuration. This option is only available when the current node is a group.

priority

type: integer default: 0

The trees from the configuration files of all bundles will be merged into one large tree. The priority option can be used to control the order in which nodes from different configuration files will be merged into the final tree. Nodes with a higher priority are shown first.