<?php
/*
* This file is part of Sulu.
*
* (c) Sulu GmbH
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
* App\Controller\Website\LoggerController
*/
namespace App\Controller\Website;
use Sulu\Bundle\WebsiteBundle\Controller\WebsiteController;
use Sulu\Component\Content\Compat\StructureInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\EventListener\AbstractSessionListener;
/**
* Default Controller for rendering templates, uses the themes from the ClientWebsiteBundle.
*/
class LoggerController extends WebsiteController
{
/**
* Loads the content from the request (filled by the route provider) and creates a response with this content and
* the appropriate cache headers.
*
* @param bool $preview
* @param bool $partial
*
* @return Response
*/
public function indexAction(StructureInterface $structure, $preview = false, $partial = false)
{
$response = $this->renderStructure(
$structure,
[],
$preview,
$partial
);
$response->headers->set(AbstractSessionListener::NO_AUTO_CACHE_CONTROL_HEADER, 'true');
return $response;
}
}