TemplateController
class TemplateController implements ContainerAwareInterface
TemplateController.
Methods
__construct(Environment $twig = null, EngineInterface $templating = null) | ||
setContainer(ContainerInterface $container = null) deprecated | ||
Response | templateAction(string $template, int|null $maxAge = null, int|null $sharedAge = null, bool|null $private = null) Renders a template. |
Details
__construct(Environment $twig = null, EngineInterface $templating = null)
Parameters
Environment | $twig | |
EngineInterface | $templating |
setContainer(ContainerInterface $container = null) deprecated
deprecated
Parameters
ContainerInterface | $container |
Response templateAction(string $template, int|null $maxAge = null, int|null $sharedAge = null, bool|null $private = null)
Renders a template.
Parameters
string | $template | The template name |
int|null | $maxAge | Max age for client caching |
int|null | $sharedAge | Max age for shared (proxy) caching |
bool|null | $private | Whether or not caching should apply for client caches only |
Return Value
Response | A Response instance |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.4/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.html