Bolt\Controller\Base::render PHP Method

render() protected method

Renders a template
protected render ( string $template, array $context = [], array $globals = [] ) : TemplateResponse
$template string Template name
$context array Context variables
$globals array Global variables
return Bolt\Response\TemplateResponse
    protected function render($template, array $context = [], array $globals = [])
    {
        return $this->app['render']->render($template, $context, $globals);
    }

Usage Example

示例#1
0
 /**
  * {@inheritdoc}
  */
 protected function render($template, array $variables = [], array $globals = [])
 {
     if (!isset($variables['context'])) {
         $variables = ['context' => $variables];
     }
     return parent::render($template, $variables, $globals);
 }
All Usage Examples Of Bolt\Controller\Base::render