Backend module configuration examples

The configuration of backend modules is placed in the dedicated configuration file: Configuration/Backend/Modules.php.

See also the See also the Backend module configuration API.

Read more about

Example: register two backend modules

You can find the following example in EXT:examples.

Two backend modules are being registered. The first module is based on Extbase while the second uses a plain controller.

EXT:my_extension/Configuration/Backend/Modules.php
<?php

declare(strict_types=1);

use T3docs\Examples\Controller\AdminModuleController;
use T3docs\Examples\Controller\ModuleController;

/**
 * Definitions for modules provided by EXT:examples
 */
return [
    // Example for a module registration with Extbase controller
    'web_examples' => [
        'parent' => 'web',
        'position' => ['after' => 'web_info'],
        'access' => 'user',
        'workspaces' => 'live',
        'path' => '/module/page/example',
        'labels' => 'LLL:EXT:examples/Resources/Private/Language/Module/locallang_mod.xlf',
        // Extbase-specific configuration telling the TYPO3 Core to bootstrap Extbase
        'extensionName' => 'Examples',
        'controllerActions' => [
            ModuleController::class => [
                'flash', 'tree', 'clipboard', 'links', 'fileReference', 'fileReferenceCreate',
            ],
        ],
    ],
    // non-Extbase module registration
    'admin_examples' => [
        'parent' => 'system',
        'position' => ['top'],
        'access' => 'user',
        'workspaces' => 'live',
        'path' => '/module/system/example',
        'labels' => 'LLL:EXT:examples/Resources/Private/Language/AdminModule/locallang_mod.xlf',
        // non-Extbase modules are route-based, provide them
        'routes' => [
            '_default' => [
                'target' => AdminModuleController::class . '::manage',
            ],
            'edit' => [
                'path' => '/edit-me',
                'target' => AdminModuleController::class . '::edit',
            ],
        ],
    ],
];
Copied!

Check if the modules have been properly registered

All registered modules are stored as objects in a registry. They can be viewed in the backend in the System > Configuration > Backend Modules module.

Exploring registered Backend Modules in the Configuration module

The ModuleProvider API allows extension authors to work with the registered modules.