original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Create the page provider service for provide the current active page model.
  
  @return PageProvider
  
  @SuppressWarnings(PHPMD.Superglobals)
docstring_tokens: Create the page provider service for provide the current active page model .