Deprecation: #93093 - MethodName in Shortcut PHP API
See forge#93093
Description
Since forge#92723 the TYPO3 backend uses symfony routing for resolving internal endpoints, e.g. modules. This will allow human readable urls and also deep-linking in the future. To achieve this, the shortcut PHP API had to be reworked to be fully compatible with the new routing. See Breaking: #93093 - Rework Shortcut PHP API for more information regarding the rework.
In the course of the rework, following methods within Shortcut
have been marked as deprecated:
TYPO3\
CMS\ Backend\ Template\ Components\ Buttons\ Action\ Shortcut Button->set Module Name () TYPO3\
CMS\ Backend\ Template\ Components\ Buttons\ Action\ Shortcut Button->get Module Name ()
Impact
Using those methods directly or indirectly will trigger PHP E_
errors.
Affected Installations
Installations with custom extensions, adding a shortcut button in the module header of their backend modules using the mentioned methods. The extension scanner will find all PHP usages as weak match.
Migration
Use the new methods Shortcut
and
Shortcut
as replacement. Please note
that these methods require the route identifier of the backend module
which may differ from the module name. To find out the route identifier,
the "Backend Routes" section within the configuration module can be used.
Before:
$shortCutButton = $buttonBar
->makeShortcutButton()
->setModuleName('web_list');
After:
$shortCutButton = $buttonBar
->makeShortcutButton()
->setRouteIdentifier('web_list');