---
title: "Deprecation: #111116 - BackendUtility::getModuleData()"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-111116-1792245903"
source: "Changelog/15.0/Deprecation-111116-BackendUtilityGetModuleData.rst"
typo3-version: "15.0"
typo3-major: 15
type: "deprecation"
issue: 111116
forge: "https://forge.typo3.org/issues/111116"
tags: ["Backend", "PHP-API", "FullyScanned", "ext:backend"]
rendered: "2026-10-27T20:58:30+00:00"
---

# Deprecation: #111116 - BackendUtility::getModuleData() {#deprecation-111116-1792245903}

See [forge#111116](https://forge.typo3.org/issues/111116)

## Description {#description}

The method
`\TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData()` has been
deprecated. It managed module settings in the backend user configuration
based on a `$MOD_MENU` array, a pattern from before backend modules
were registered via [`Configuration/Backend/Modules.php`](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ExtensionArchitecture/FileStructure/Configuration/Backend/Index.html#file-extension-configuration-backend-modules-php).

Backend modules receive their settings as
`\TYPO3\CMS\Backend\Module\ModuleData` object in the request attribute
`moduleData`, which is created, filled and persisted by the backend
module middleware.

## Impact {#impact}

Calling the method triggers a PHP `E_USER_DEPRECATED` error. The
extension scanner reports usages.

## Affected installations {#affected-installations}

Installations with extensions calling
`\TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData()` in custom backend modules.

## Migration {#migration}

Declare the module settings and their default values in the
`moduleData` option of the module registration. Values sent with the
request under the same names are then persisted automatically. Read the
settings from the `moduleData` request attribute and use
`\TYPO3\CMS\Backend\Module\ModuleData->cleanUp()` to restrict menu settings to allowed values.

Before:

```php
use TYPO3\CMS\Backend\Utility\BackendUtility;

$menu = [
    'mode' => ['list' => 'List', 'tiles' => 'Tiles'],
];
$settings = BackendUtility::getModuleData(
    $menu,
    $request->getParsedBody()['SET'] ?? [],
    'my_module'
);
$mode = $settings['mode'];
```

After:

**EXT:my_extension/Configuration/Backend/Modules.php**

```php
return [
    'my_module' => [
        // ...
        'moduleData' => [
            'mode' => 'list',
        ],
    ],
];
```

```php
use TYPO3\CMS\Backend\Module\ModuleData;

/** @var ModuleData $moduleData */
$moduleData = $request->getAttribute('moduleData');
if ($moduleData->clean('mode', ['list', 'tiles'])) {
    $this->getBackendUser()->pushModuleData(
        $moduleData->getModuleIdentifier(),
        $moduleData->toArray()
    );
}
$mode = $moduleData->get('mode');
```
