Skip to content

Commit

Permalink
[BUG] Fix BarChartWidgets in v12
Browse files Browse the repository at this point in the history
BarChartWidgets need a BackendViewFactory
which is added now.
  • Loading branch information
rintisch committed Apr 9, 2024
1 parent 513d973 commit 571d11c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Configuration/Backend/Widgets/OrdersPerDayWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Component\DependencyInjection\Reference;
use TYPO3\CMS\Backend\View\BackendViewFactory;
use TYPO3\CMS\Dashboard\Widgets\BarChartWidget;

return function (ContainerConfigurator $configurator) {
$services = $configurator->services();

$services->set('dashboard.widget.extcode.cart.orders_per_day')
->class(BarChartWidget::class)
->arg('$backendViewFactory', new Reference(BackendViewFactory::class))
->arg('$dataProvider', new Reference('extcode.cart.provider.orders_per_day'))
->arg('$view', new Reference('dashboard.views.widget'))
->tag('dashboard.widget', [
'identifier' => 'OrdersPerDay',
'groupNames' => 'cart',
Expand Down
3 changes: 2 additions & 1 deletion Configuration/Backend/Widgets/TurnoverPerDayWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Component\DependencyInjection\Reference;
use TYPO3\CMS\Backend\View\BackendViewFactory;
use TYPO3\CMS\Dashboard\Widgets\BarChartWidget;

return function (ContainerConfigurator $configurator) {
$services = $configurator->services();

$services->set('dashboard.widget.extcode.cart.turnover_per_day')
->class(BarChartWidget::class)
->arg('$backendViewFactory', new Reference(BackendViewFactory::class))
->arg('$dataProvider', new Reference('extcode.cart.provider.turnover_per_day'))
->arg('$view', new Reference('dashboard.views.widget'))
->tag('dashboard.widget', [
'identifier' => 'TurnoverPerDay',
'groupNames' => 'cart',
Expand Down

0 comments on commit 571d11c

Please sign in to comment.