Migration¶
By implementing the required methods of the interfaces, the custom reports are fully backwards compatible.
Note
Additional methods have been added to the interfaces
TYPO3\CMS\Reports\ReportInterface
and
TYPO3\CMS\Reports\StatusProviderInterface
with version 12.0.
If TYPO3 v12+ is the only supported version, the configuration
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']
from the
ext_localconf.php
file can be removed. If you need to support
version 11 you can leave the configurations in the file. They are not
evaluated anymore in version 12.
Report¶
If autoconfigure
is not enabled in your Configuration/Services.(yaml|php)
,
add the tag reports.report
manually to your reports
service.
Vendor\MyExtension\Report\MyReport:
tags:
- name: reports.report
The old registration can be removed, if support for TYPO3 v11 or lower is not necessary.
// Before in ext_localconf.php
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['extension']['general'] = [
'title' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:title',
'description' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:description',
'icon' => 'EXT:my_extension/Resources/Public/Icons/Extension.svg',
'report' => \Vendor\MyExtension\Report\MyReport::class
];
Additionally, make sure to implement all methods of
TYPO3\CMS\Reports\ReportInterface
.
use TYPO3\CMS\Reports\ReportInterface;
class MyReport implements ReportInterface
{
// ...
// Implement additional methods from ReportInterface
public function getReport(): string
{
return 'Full report';
}
public function getIdentifier(): string
{
return 'general';
}
public function getTitle(): string
{
return 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:title';
}
public function getDescription(): string
{
return 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:description';
}
public function getIconIdentifier(): string
{
return 'module-reports';
}
}
Refer to the Icon API on how to register the icon.
Status¶
If autoconfigure
is not enabled in your Configuration/Services.(yaml|php)
,
add the tag reports.status
manually to your status
service.
The old registration can be removed, if support for TYPO3 v11 or lower is not necessary.
// Before in ext_localconf.php
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['label'] = [
\Vendor\MyExtension\Status\MyStatus::class,
];
Additionally, make sure to implement all methods of
TYPO3\CMS\Reports\StatusProviderInterface
.
use TYPO3\CMS\Reports\StatusProviderInterface
class MyStatus implements StatusProviderInterface
{
// ...
// Implement additional methods from StatusProviderInterface
public function getStatus(): array
{
return [];
}
public function getLabel(): string
{
return 'label';
}
}