Breaking: #107712 - New method hasSubmoduleOverview() in ModuleInterface
See forge#107712
Description
The interface
\TYPO3\ has been extended
with a new method
has to support the new card-based
submodule overview feature introduced in
Feature: #107712 - Introduce card-based submodule overview.
Impact
All custom implementations of
\TYPO3\ must now implement the new
method
has.
Existing implementations that do not implement this method will trigger a PHP fatal error.
Affected installations
TYPO3 installations with custom PHP code that directly implement the
Module are affected.
This is uncommon, as most backend modules use the provided
\TYPO3\ class or extend from
\TYPO3\.
Migration
Add the
has method to your custom implementation of
Module.
The method should typically return the configured value rather than a fixed boolean:
use TYPO3\CMS\Backend\Module\ModuleInterface;
class MyCustomModule implements ModuleInterface
{
protected array $configuration = [];
public function hasSubmoduleOverview(): bool
{
// Return the configured value, defaulting to false
return $this->configuration['showSubmoduleOverview'] ?? false;
}
}
This allows the behavior to be controlled through the module's configuration.