Skip to content

Commit

Permalink
Param overlay in month view
Browse files Browse the repository at this point in the history
  • Loading branch information
lochmueller committed Oct 12, 2023
1 parent 8862a34 commit c19d063
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Classes/Controller/CalendarController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
use TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter;
use TYPO3\CMS\Extbase\Service\ImageService;
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;

/**
Expand Down Expand Up @@ -396,6 +397,21 @@ public function quarterAction(int $year = 0, int $quarter = 1): ResponseInterfac
*/
public function monthAction(int $year = 0, int $month = 0, int $day = 0): ResponseInterface
{
// @todo Check how we could map the arguments automatically
$params = $this->request->getQueryParams();
$calendarize = $params['tx_calendarize_calendar'] ?? [];

if ($year === 0) {
$year = (int)($calendarize['year'] ?? 0);
}
if ($month === 0) {
$month = (int)($calendarize['month'] ?? 0);
}
if ($day === 0) {
$day = (int)($calendarize['day'] ?? 0);
}


$this->checkStaticTemplateIsIncluded();
if ($this->request->hasArgument('format')) {
if ('html' != $this->request->getArgument('format')) {
Expand Down

0 comments on commit c19d063

Please sign in to comment.