-
Notifications
You must be signed in to change notification settings - Fork 11
Setup: Modules configuration
Dante Di Domenico edited this page Nov 11, 2021
·
14 revisions
Keys must be actual API endpoint names like documents
, users
or folders
.
Modules order will follow key order of this configuration.
In case of core or plugin modules not directly served by ModulesController (generally modules not related to object types) a 'route' attribute can be specified for custom controller and action rules.
Array value may contain:
- 'label' - module label to display, if not set
key
will be used - 'shortLabel' - short label, 3 character recommended
- 'color' - primary color code
- 'route' - (optional) custom route (named route or absolute/relative URL) used by plugin modules mainly
- 'secondaryColor' - secondary color code
- 'sort' - sort order to be used in index; use a field name prepending optionl
-
sign to indicate a descendant order, f.i. '-title' will sort by title in reverse alphabetical order (default is '-id') - 'icon' - icon code, f.i.
icon-article
, have a look inwebroot/css/be-icons-codes.css
for a complete list of codes
Example:
'Modules' => [
'planets' => [
'label' => 'Our Planets',
'shortLabel' => 'pls',
'route' => 'my-plugin::planets-list',
'color' => '#230637',
'secondaryColor' => '#d95700',
'sort' => '-modified',
'icon' => 'icon-cube',
],
],