Skip to content

Commit

Permalink
Version 4.0.0 beta 7
Browse files Browse the repository at this point in the history
  • Loading branch information
bihor committed Jun 27, 2023
1 parent 3838471 commit 66655fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions Classes/Widgets/Provider/ParticipantsDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ protected function getNumberOfVotesInPeriod(int $start, int $end): int
$queryBuilder->createNamedParameter($end, Connection::PARAM_INT)
)
)
->execute()
->fetchColumn();
->executeQuery()
->fetchOne();
}

protected function calculateDataForLastDays(): void
Expand Down Expand Up @@ -115,8 +115,8 @@ public function getRecentParticipants(): array
)
->orderBy('startdate', 'DESC')
->setMaxResults(7)
->execute()
->fetchAll();
->executeQuery()
->fetchAllAssociative();
$i = 0;
foreach ($dataArray as $result) {
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_fpmasterquiz_domain_model_selected');
Expand Down Expand Up @@ -153,8 +153,8 @@ public function getRecentParticipants(): array
)
->orderBy('tx_fpmasterquiz_domain_model_selected.sorting', 'ASC')
->setMaxResults(1)
->execute()
->fetchAll();
->executeQuery()
->fetchAllAssociative();
foreach ($answerArray as $oneAnswer) {
$dataArray[$i]['question1'] = $oneAnswer['questiontitle'];
$dataArray[$i]['answer1'] = $oneAnswer['answertitle'];
Expand Down
7 changes: 4 additions & 3 deletions Configuration/Services.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Symfony\Component\DependencyInjection\Reference;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Dashboard\Widgets\BarChartWidget;
use TYPO3\CMS\Backend\View\BackendViewFactory;
use Fixpunkt\FpMasterquiz\Widgets\Provider\ParticipantsDataProvider;
use Fixpunkt\FpMasterquiz\Widgets\RecentParticipantsWidget;

Expand All @@ -32,8 +33,6 @@

$services->set('dashboard.widget.fixpunktLastDays')
->class(BarChartWidget::class)
->arg('$dataProvider', new Reference(ParticipantsDataProvider::class))
->arg('$view', new Reference('dashboard.views.widget'))
->tag(
'dashboard.widget',
[
Expand All @@ -45,6 +44,8 @@
'height' => 'medium',
'width' => 'medium'
]
);
)
->arg('$dataProvider', new Reference(ParticipantsDataProvider::class))
->arg('$backendViewFactory', new Reference(BackendViewFactory::class));;
}
};

0 comments on commit 66655fb

Please sign in to comment.