Render page with theme wrapper from custom controller? I've created a page layout using panels in the Drupal admin UI (page_machine_id). I'm trying to load that page into a custom controller like so and render one of the variants (Drupal 8):

public function profile() {
    $page = \Drupal\page_manager\Entity\Page::load('page_machine_id');
    $variants = $page-&gt;getVariants();
    $pageVariant = end($variants);
    $viewer = new \Drupal\page_manager\Entity\PageVariantViewBuilder();
    $pageArray = $viewer-&gt;view($pageVariant);
    return new Response(render($pageArray));
}


This renders the page content correctly, but does not include the theme wrapper around it and I can't figure out how to get the theme to show.

Thanks.
solution is 

    return $pageArray;


Adding Response bypasses Drupals rendering.