TemplateController.php 827 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Symfony\Bundle\FrameworkBundle\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  4. use Symfony\Component\HttpFoundation\Response;
  5. /*
  6. * This file is part of the Symfony framework.
  7. *
  8. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  9. *
  10. * This source file is subject to the MIT license that is bundled
  11. * with this source code in the file LICENSE.
  12. */
  13. /**
  14. * TemplateController.
  15. *
  16. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  17. */
  18. class TemplateController extends Controller
  19. {
  20. /**
  21. * Renders a template.
  22. *
  23. * @param string $template The template name
  24. *
  25. * @return Response A Response instance
  26. */
  27. public function templateAction($template)
  28. {
  29. return $this['templating']->renderResponse($template);
  30. }
  31. }