public function render($templateName, $context = [], $globals = [])
    {
        Deprecated::method(3.3);

        $template = $this->app['twig']->resolveTemplate($templateName);

        foreach ($globals as $name => $value) {
            $this->app['twig']->addGlobal($name, $value);
        }

        $html = twig_include($this->app['twig'], $context, $template, [], true, false, $this->safe);

        $response = new TemplateResponse($template->getTemplateName(), $context, $html);

        return $response;
    }
public function render($templateName, $context = [], $globals = [])
    {
        Deprecated::method(3.3);

        $template = $this->app['twig']->resolveTemplate($templateName);

        foreach ($globals as $name => $value) {
            $this->app['twig']->addGlobal($name, $value);
        }

        $html = twig_include($this->app['twig'], $context, $template, [], true, false, $this->safe);

        $response = new TemplateResponse($template->getTemplateName(), $context, $html);

        return $response;
    }
public function render ( $ templateName , $ context = [ ] , $ globals = [ ] ) { Deprecated :: method ( 3.3 ) ; $ template = $ this -> app [ 'twig' ] -> resolveTemplate ( $ templateName ) ; foreach ( $ globals as $ name => $ value ) { $ this -> app [ 'twig' ] -> addGlobal ( $ name , $ value ) ; } $ html = twig_include ( $ this -> app [ 'twig' ] , $ context , $ template , [ ] , true , false , $ this -> safe ) ; $ response = new TemplateResponse ( $ template -> getTemplateName ( ) , $ context , $ html ) ; return $ response ; }
Render a template, possibly store it in cache. Or, if applicable, return the cached result.

@param string|string[] $templateName Template name(s)
@param array           $context      Context variables
@param array           $globals      Global variables

@return TemplateResponse

@deprecated Since 3.3, will be removed in 4.0.
Render a template possibly store it in cache . Or if applicable return the cached result .