Add AbstractController, implement flash message handling, and refactor repositories

This commit is contained in:
2025-03-05 21:01:57 +01:00
parent 29bc74fe4f
commit 0ccce51af8
18 changed files with 111 additions and 21 deletions

View File

@@ -0,0 +1,19 @@
<?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 function addFlash(FlashType|string $type, mixed $message): void
{
if ($type instanceof FlashType) {
$type = $type->value;
}
parent::addFlash($type, $message);
}
}