class TemplateController implements ContainerAwareInterface

TemplateController.

Properties

protected $container

Methods

__construct(Environment $twig = null, EngineInterface $templating = null)

No description

setContainer(ContainerInterface $container = null) deprecated

No description

templateAction(string $template, int|null $maxAge = null, int|null $sharedAge = null, bool|null $private = null)

Renders a template.

Details

at line 37
__construct(Environment $twig = null, EngineInterface $templating = null)

Parameters

Environment $twig
EngineInterface $templating

at line 46
setContainer(ContainerInterface $container = null) deprecated

deprecated since version 3.4, to be removed in 4.0 alongside with the ContainerAwareInterface type.

Parameters

ContainerInterface $container

at line 68
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