mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-06 04:44:19 +01:00
This commit introduces the ability to clear quiz results and delete quizzes directly from the backoffice. It includes new routes, controllers, modals for user confirmation, and updates to translations. The `QuizRepository` now supports dedicated methods for clearing results and deleting quizzes along with error handling. Related database migrations and front-end adjustments are also included.
26 lines
611 B
PHP
26 lines
611 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Enum\FlashType;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController as AbstractBaseController;
|
|
|
|
abstract class AbstractController extends AbstractBaseController
|
|
{
|
|
protected const string SEASON_CODE_REGEX = '[A-Za-z\d]{5}';
|
|
|
|
protected const string CANDIDATE_HASH_REGEX = '[\w\-=]+';
|
|
|
|
#[\Override]
|
|
protected function addFlash(FlashType|string $type, mixed $message): void
|
|
{
|
|
if ($type instanceof FlashType) {
|
|
$type = $type->value;
|
|
}
|
|
|
|
parent::addFlash($type, $message);
|
|
}
|
|
}
|