first commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace KupShop\ResponseCacheBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class FragmentController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @Route("/_fragment/{type}/", requirements={"type"="[a-zA-Z0-9_-]+"})
|
||||
*/
|
||||
public function fragmentAction(string $type)
|
||||
{
|
||||
$smarty = createSmarty(false, true);
|
||||
$response = new Response($smarty->fetch("fragments/{$type}.tpl"));
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user