src/Controller/Website/LoggerController.php line 34

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of Sulu.
  4.  *
  5.  * (c) Sulu GmbH
  6.  *
  7.  * This source file is subject to the MIT license that is bundled
  8.  * with this source code in the file LICENSE.
  9.  * App\Controller\Website\LoggerController
  10.  */
  11. namespace App\Controller\Website;
  12. use Sulu\Bundle\WebsiteBundle\Controller\WebsiteController;
  13. use Sulu\Component\Content\Compat\StructureInterface;
  14. use Symfony\Component\HttpFoundation\Response;
  15. use Symfony\Component\HttpKernel\EventListener\AbstractSessionListener;
  16. /**
  17.  * Default Controller for rendering templates, uses the themes from the ClientWebsiteBundle.
  18.  */
  19. class LoggerController extends WebsiteController
  20. {
  21.     /**
  22.      * Loads the content from the request (filled by the route provider) and creates a response with this content and
  23.      * the appropriate cache headers.
  24.      *
  25.      * @param bool $preview
  26.      * @param bool $partial
  27.      *
  28.      * @return Response
  29.      */
  30.     public function indexAction(StructureInterface $structure$preview false$partial false)
  31.     {
  32.         $response $this->renderStructure(
  33.             $structure,
  34.             [],
  35.             $preview,
  36.             $partial
  37.         );
  38.         $response->headers->set(AbstractSessionListener::NO_AUTO_CACHE_CONTROL_HEADER'true');
  39.         return $response;
  40.     }
  41. }