feat: further decouple logic using events
This commit is contained in:
@@ -5,7 +5,6 @@ namespace App\Controller\Admin\Application;
|
||||
use App\Entity\Application;
|
||||
use App\Event\ApplicationDeletedEvent;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
@@ -16,8 +15,7 @@ class DeleteController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $entityManager,
|
||||
private readonly EventDispatcherInterface $eventDispatcher,
|
||||
private readonly LoggerInterface $logger
|
||||
private readonly EventDispatcherInterface $eventDispatcher
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -36,11 +34,6 @@ class DeleteController extends AbstractController
|
||||
|
||||
$this->addFlash('success', 'Die Bewerbung wurde gelöscht');
|
||||
|
||||
$this->logger->info('Delete application', [
|
||||
'destination' => (string) $application->getAssignment()->getDestination(),
|
||||
'teamer' => (string) $application->getTeamer(),
|
||||
]);
|
||||
|
||||
return $this->redirectToRoute('app_administrative_assignment_detail', [
|
||||
'uuid' => $application->getAssignment()->getUuid(),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user