Feature: #102631 - Introduce AsController attribute to autoconfigure backend controllers
See forge#102631
Description
A new custom PHP attribute \TYPO3\
has
been introduced in order to automatically tag backend controllers, making them
available in the service container and enabling dependency injection.
Instead of adding the backend.
manually, the attribute
can be set on the class:
use TYPO3\CMS\Backend\Attribute\AsController;
#[AsController]
class MyBackendController {
}
Copied!
Note
The attribute is a drop-in replacement for the
deprecated
\TYPO3\
attribute.
Impact
It's now possible to automatically tag a backend controller by adding the new
PHP attribute \TYPO3\
.