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.
Dashboards¶
Filename |
|
Root Node |
|
Sections |
The dashboards.yml
file is used to configure dashboards and widgets that are rendered on a
dashboard:
1# src/Acme/DemoBundle/Resources/config/dashboards.yml
2dashboards:
3 widgets:
4 # a "my_calendar" widget displaying the user's calendar on the dashboard
5 my_calendar:
6 label: oro.calendar.my_calendar_widget_title
7 route: oro_calendar_dashboard_my_calendar
8 acl: oro_calendar_view
9 description: oro.calendar.my_calendar_widget_description
10 icon: bundles/orocalendar/img/my_calendar.png
11
12 dashboards:
13 # a dashboard named "main" using the given template
14 main:
15 twig: OroDashboardBundle:Index:default.html.twig
16
17 widgets_configuration:
18 # a "title" option for all dashboard widgets
19 title:
20 type: oro_type_widget_title
21 options:
22 label: oro.dashboard.title.label
23 required: false
dashboards
¶
type: map
The dashboards
key is used to configure options for dashboards. The key is the name of the
dashboard and the options are the values. Currently, there is only one supported option:
twig
¶
type: string
The Twig template used to render the dashboard. OroDashboardBundle:Index:default.html.twig
is
used when no value is configured.
widgets
¶
type: map
The keys are strings that each uniquely identiy a dashboard widget. The value again is a map that holds the configuration of the widget for which the following options can be used:
acl
¶
type: string
The given access control list is evaluated to decide whether or not a user is allowed to see the widget.
configuration
¶
type: map
You can define an arbitrary set of configuration options the user can use to configure the widget (for example to customize the way it is rendered, its behavior, etc.). Each key of the map represents the name of a configuration option, its values are maps that can use the following keys:
options
(type: map
)
A map of options and their values configuring the Symfony form type (see the
type
option below). You can find a complete reference of available options for Symfony’s built-in form types in the Symfony documentation.
show_on_widget
(type: boolean
)
If this option is set to
true
, the user can see the currently configured value at the bottom of the widget.
type
(type: string
)
The Symfony form type name that is used to define what kind of input will be used to ask for user input.
description
¶
type: string
A description that is used to explain what the widget is supposed to do.
icon
¶
type: string
This option configures an icon that is shown next to the widget’s name and description in the UI when the users configures a dashboard.
label
¶
type: string
The widget name.
position
¶
type: integer
default: 0
The initial position of a widget when it is added to a dashboard.
route
¶
type: string
When the widget is rendered on the dashboard, the URL of the configured route will be requested and the response will be displayed at the widget’s position.
route_parameters
¶
type: map
Additional parameters that are passed to the URL generator when generating the URL for the configured route.
widgets_configuration
¶
type: map
With the configuration key you can define a set of options the user can customize for a certain
widget. You can use the widgets_configuration
key to configure options that will be available
for all widgets. Each option can be configured with the same keys that are available when defining
widget options:
options
(type: map
)
A map of options and their values configuring the Symfony form type (see the
type
option below). You can find a complete reference of available options for Symfony’s built-in form types in the Symfony documentation.
show_on_widget
(type: boolean
)
If this option is set to
true
, the user can see the currently configured value at the bottom of the widget.
type
(type: string
)
The Symfony form type name that is used to define what kind of input will be used to ask for user input.