public function createTemplateResponse($response)
    {
        $page = $this->getPage();

        $view = new View();
        $view->setContext($this);
        $view->setTemplatePath($this->getTemplatePath());
        $configuration = ConfigurationManager::getConfiguration();
        $view->assignMultiple(
            [
                'page'          => $page,
                'meta'          => $page ? $page->getMeta() : [],
                'content'       => $response->getBody(),
                'response'      => $response,
                'resourcePath'  => $configuration->getResourceDirectoryUri(),
                'configuration' => $configuration,
            ]
        );

        return new Response(
            $view->render(),
            $response->getStatusCode(),
            $response->getStatusText()
        );
    }
public function createTemplateResponse($response)
    {
        $page = $this->getPage();

        $view = new View();
        $view->setContext($this);
        $view->setTemplatePath($this->getTemplatePath());
        $configuration = ConfigurationManager::getConfiguration();
        $view->assignMultiple(
            [
                'page'          => $page,
                'meta'          => $page ? $page->getMeta() : [],
                'content'       => $response->getBody(),
                'response'      => $response,
                'resourcePath'  => $configuration->getResourceDirectoryUri(),
                'configuration' => $configuration,
            ]
        );

        return new Response(
            $view->render(),
            $response->getStatusCode(),
            $response->getStatusText()
        );
    }
public function createTemplateResponse ( $ response ) { $ page = $ this -> getPage ( ) ; $ view = new View ( ) ; $ view -> setContext ( $ this ) ; $ view -> setTemplatePath ( $ this -> getTemplatePath ( ) ) ; $ configuration = ConfigurationManager :: getConfiguration ( ) ; $ view -> assignMultiple ( [ 'page' => $ page , 'meta' => $ page ? $ page -> getMeta ( ) : [ ] , 'content' => $ response -> getBody ( ) , 'response' => $ response , 'resourcePath' => $ configuration -> getResourceDirectoryUri ( ) , 'configuration' => $ configuration , ] ) ; return new Response ( $ view -> render ( ) , $ response -> getStatusCode ( ) , $ response -> getStatusText ( ) ) ; }
Fill the template with the contents

@param Response $response
@return Response
Fill the template with the contents