public function getSitePageTemplateConfig(Site $site, $template = null)
    {
        $themePageConfig = $this->getSiteThemePagesTemplateConfig($site);

        if (!empty($themePageConfig[$template])) {
            return $themePageConfig[$template];
        } elseif (!empty($themePageConfig['default'])) {
            return $themePageConfig['default'];
        }

        throw new RuntimeException('No Page Template Found in config');
    }
public function getSitePageTemplateConfig(Site $site, $template = null)
    {
        $themePageConfig = $this->getSiteThemePagesTemplateConfig($site);

        if (!empty($themePageConfig[$template])) {
            return $themePageConfig[$template];
        } elseif (!empty($themePageConfig['default'])) {
            return $themePageConfig['default'];
        }

        throw new RuntimeException('No Page Template Found in config');
    }
public function getSitePageTemplateConfig ( Site $ site , $ template = null ) { $ themePageConfig = $ this -> getSiteThemePagesTemplateConfig ( $ site ) ; if ( ! empty ( $ themePageConfig [ $ template ] ) ) { return $ themePageConfig [ $ template ] ; } elseif ( ! empty ( $ themePageConfig [ 'default' ] ) ) { return $ themePageConfig [ 'default' ] ; } throw new RuntimeException ( 'No Page Template Found in config' ) ; }
Get Page Template method will attempt to locate and fetch the correct template
config for the page.  Default page template is set by the themes
configuration and can also be set per page.

@param Site $site Site to lookup
@param string|null $template Template to find


@return string
@throws RuntimeException
@throws InvalidArgumentException
Get Page Template method will attempt to locate and fetch the correct template config for the page . Default page template is set by the themes configuration and can also be set per page .