first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?php
namespace KupShop\ComponentsBundle\Controller;
use KupShop\ComponentsBundle\View\ModalView;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class ModalController extends AbstractController
{
#[Route('/_modal/{template}', requirements: ['template' => '[-_\w]+'])]
public function modalAction(string $template, Request $request, ModalView $view): Response
{
return $view
->setTemplate("modal_lazy/{$template}.html.twig")
->addBodyVariables(iterator_to_array($request->query->getIterator()))
->getResponse();
}
}