Jarves\PageResponseFactory::createFromRoute PHP Method

createFromRoute() public method

You need to define at your routes additional options: title, theme, layout.
public createFromRoute ( null $routeName = null, string | array | null $contents = null ) : PageResponse
$routeName null Per default current route name, if available
$contents string | array | null
return PageResponse
    public function createFromRoute($routeName = null, $contents = null)
    {
        $page = $this->createPageFromRoute($routeName);
        return $this->createFromPage($page, $contents);
    }

Usage Example

Example #1
0
 public function showAction()
 {
     return $this->pageResponseFactory->createFromRoute();
 }