diff --git a/typo3/sysext/backend/Classes/Module/BaseModule.php b/typo3/sysext/backend/Classes/Module/BaseModule.php index d91230fa5a1c03b5fa660cd15df4c6b21dc5d31d..d761ce1429bef0bcee0346867879c0c1adc2a39f 100644 --- a/typo3/sysext/backend/Classes/Module/BaseModule.php +++ b/typo3/sysext/backend/Classes/Module/BaseModule.php @@ -212,7 +212,11 @@ abstract class BaseModule $obj->component = (string)$configuration['component']; } - if (str_starts_with((string)($configuration['labels'] ?? ''), 'LLL:')) { + if (is_array($configuration['labels'] ?? null)) { + $obj->title = (string)($configuration['labels']['title'] ?? ''); + $obj->description = (string)($configuration['labels']['description'] ?? ''); + $obj->shortDescription = (string)($configuration['labels']['shortDescription'] ?? ''); + } elseif (str_starts_with((string)($configuration['labels'] ?? ''), 'LLL:')) { $labelsFile = $configuration['labels']; $obj->title = $labelsFile . ':mlang_tabs_tab'; $obj->description = $labelsFile . ':mlang_labels_tabdescr'; diff --git a/typo3/sysext/core/Documentation/Changelog/12.0/Feature-96733-NewBackendModuleRegistrationAPI.rst b/typo3/sysext/core/Documentation/Changelog/12.0/Feature-96733-NewBackendModuleRegistrationAPI.rst index 54c983365a325a200054aa4ad97efdb6acf9acd5..aea26c7091299829b4af6d1e9735abce230d7b2a 100644 --- a/typo3/sysext/core/Documentation/Changelog/12.0/Feature-96733-NewBackendModuleRegistrationAPI.rst +++ b/typo3/sysext/core/Documentation/Changelog/12.0/Feature-96733-NewBackendModuleRegistrationAPI.rst @@ -141,8 +141,17 @@ Module configuration options +----------------------------------------------------------+------------------------------------------------------------------+ | icon (:php:`string`) | Path to a module icon (Deprecated: Use `iconIdentifier` instead) | +----------------------------------------------------------+------------------------------------------------------------------+ -| labels (:php:`string`) | The locallang path for the module labels. The referenced file | -| | should contain the following labels: | +| labels (:php:`array` or :php:`string`) | An :php:`array` with following keys: | +| | | +| | - `title` | +| | - `description` | +| | - `shortDescription` | +| | | +| | The value can either be a static string or a locallang label | +| | reference. | +| | | +| | It's also possible to define the path to a locallang file. | +| | The referenced file should contain the following label keys: | | | | | | - `mlang_tabs_tab` (Used as module title) | | | - `mlang_labels_tabdescr` (Used as module description) |