Jarves\PageResponseFactory::createFromPageWithBody PHP Method

createFromPageWithBody() public method

If you've a theme then you could specify "theme" at the route options (to have a custom doctype/base template) Note: The actual rendering of $view is delayed to the PageResponse::prepare() which is called shortly before sending the request.
public createFromPageWithBody ( string $view, array $parameters = [], Node $page = null ) : PageResponse
$view string
$parameters array
$page Jarves\Model\Node
return PageResponse
    public function createFromPageWithBody($view, $parameters = [], Node $page = null)
    {
        $pageResponse = $this->createFromPage($page);
        $body = function () use($view, $parameters, $pageResponse) {
            $parameters = array_merge($pageResponse->getPageViewParameter(), $parameters);
            return $this->templating->render($view, $parameters);
        };
        $pageResponse->setBody($body);
        return $pageResponse;
    }