Note that if the current Request has no ESI capability, this method falls back to use the inline rendering strategy.
Additional available options:
Overrides FragmentRendererInterface::render
Symfony\Component\HttpKernel\HttpCache\ESI
public function render($uri, Request $request, array $options = array()) {
if (!$this->esi
->hasSurrogateEsiCapability($request)) {
return $this->inlineStrategy
->render($uri, $request, $options);
}
if ($uri instanceof ControllerReference) {
$uri = $this
->generateFragmentUri($uri, $request);
}
$alt = isset($options['alt']) ? $options['alt'] : null;
if ($alt instanceof ControllerReference) {
$alt = $this
->generateFragmentUri($alt, $request);
}
$tag = $this->esi
->renderIncludeTag($uri, $alt, isset($options['ignore_errors']) ? $options['ignore_errors'] : false, isset($options['comment']) ? $options['comment'] : '');
return new Response($tag);
}