Widgets
Plugin configuration file
Your plugin must define its properties and the list of its widgets in the Resources/config/config.yml file.
This file will be parsed by the plugin installer to install your plugin and create all your declared widgets in the database.
1
2
3
4
5
6
7
8
9
10
11
12
plugin:
# Widgets declared by your plugin.
widgets:
# Each widget requires a name.
- name: claroline_example
# Set this to true if the widget is configurable
is_configurable: true
# You can set an icon for your widget. The icon must be in your public/images/icons folder.
icon: something.jpeg
- name: claroline_theanswertolifeuniverseandeverything
is_configurable: false
Translations
- widget.xx.json
We use lower case for every translation keys.
Create the widget file in your Resources/translations folder. You can translate your widget names here.
1
2
3
{
"mywidgetname": "mytranslation"
}
Where mywidgetname
is the name you defined in your config file.