public function createPageProviderService()
    {
        $pageProvider = new PageProvider();

        if (isset($GLOBALS['TL_HOOKS']['getPageLayout']) && is_array($GLOBALS['TL_HOOKS']['getPageLayout'])) {
            array_unshift(
                $GLOBALS['TL_HOOKS']['getPageLayout'],
                [PageProvider::class, 'setPage']
            );
        } else {
            $GLOBALS['TL_HOOKS']['getPageLayout'] = [[PageProvider::class, 'setPage']];
        }

        return $pageProvider;
    }