src/Controller/View.php
public function view($name, array $context = [])
    {
        $context += ['current_url' => $this->getRequest()->getUri()];
        
        if (method_exists($this, 'flash')) {
            $context += ['flash' => $this->flash()];
        }
        
        $response = $this->getViewer()->render($this->getResponse(), $name, $context);
        
        $this->setResponse($response);
    }
public function view($name, array $context = [])
    {
        $context += ['current_url' => $this->getRequest()->getUri()];
        
        if (method_exists($this, 'flash')) {
            $context += ['flash' => $this->flash()];
        }
        
        $response = $this->getViewer()->render($this->getResponse(), $name, $context);
        
        $this->setResponse($response);
    }
public function view ( $ name , array $ context = [ ] ) { $ context += [ 'current_url' => $ this -> getRequest ( ) -> getUri ( ) ] ; if ( method_exists ( $ this , 'flash' ) ) { $ context += [ 'flash' => $ this -> flash ( ) ] ; } $ response = $ this -> getViewer ( ) -> render ( $ this -> getResponse ( ) , $ name , $ context ) ; $ this -> setResponse ( $ response ) ; }
View rendered template

@param string $name    Template name
@param array  $context Template context
View rendered template