-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
305 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Contao Event Registration extension. | ||
* | ||
* (c) INSPIRED MINDS | ||
* | ||
* @license LGPL-3.0-or-later | ||
*/ | ||
|
||
namespace InspiredMinds\ContaoEventRegistration\Cron; | ||
|
||
use Contao\CoreBundle\DependencyInjection\Attribute\AsCronJob; | ||
use InspiredMinds\ContaoEventRegistration\WaitingListChecker; | ||
|
||
#[AsCronJob('hourly')] | ||
class WaitingListsCronJob | ||
{ | ||
public function __construct(private readonly WaitingListChecker $waitingListChecker) | ||
{ | ||
} | ||
|
||
public function __invoke(): void | ||
{ | ||
($this->waitingListChecker)(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...ataContainer/CalendarEvents/WaitingListAdvancementNotificationOptionsCallbackListener.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Contao Event Registration extension. | ||
* | ||
* (c) INSPIRED MINDS | ||
* | ||
* @license LGPL-3.0-or-later | ||
*/ | ||
|
||
namespace InspiredMinds\ContaoEventRegistration\EventListener\DataContainer\CalendarEvents; | ||
|
||
use Contao\CoreBundle\DependencyInjection\Attribute\AsCallback; | ||
use Doctrine\DBAL\Connection; | ||
use InspiredMinds\ContaoEventRegistration\NotificationTypes; | ||
|
||
#[AsCallback('tl_calendar_events', 'fields.reg_waitingListAdvancementNotification.options')] | ||
class WaitingListAdvancementNotificationOptionsCallbackListener | ||
{ | ||
public function __construct(private readonly Connection $db) | ||
{ | ||
} | ||
|
||
public function __invoke(): array | ||
{ | ||
return $this->db->fetchAllKeyValue('SELECT id, title FROM tl_nc_notification WHERE type = ? ORDER BY title', [NotificationTypes::WAITING_LIST_ADVANCEMENT]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/EventListener/DataContainer/EventRegistration/ConfigOnSubmitCallbackListener.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Contao Event Registration extension. | ||
* | ||
* (c) INSPIRED MINDS | ||
* | ||
* @license LGPL-3.0-or-later | ||
*/ | ||
|
||
namespace InspiredMinds\ContaoEventRegistration\EventListener\DataContainer\EventRegistration; | ||
|
||
use Contao\CalendarEventsModel; | ||
use Contao\CoreBundle\DependencyInjection\Attribute\AsCallback; | ||
use Contao\DataContainer; | ||
use InspiredMinds\ContaoEventRegistration\WaitingListChecker; | ||
|
||
#[AsCallback('tl_event_registration', 'config.onsubmit')] | ||
class ConfigOnSubmitCallbackListener | ||
{ | ||
public function __construct(private readonly WaitingListChecker $waitingListChecker) | ||
{ | ||
} | ||
|
||
public function __invoke(DataContainer $dc): void | ||
{ | ||
if ($event = CalendarEventsModel::findById($dc->activeRecord?->pid)) { | ||
($this->waitingListChecker)($event); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.