/**
  * @param TypoScriptFrontendController $typoScriptFrontendController
  */
 protected function configurePageRenderer(TypoScriptFrontendController $typoScriptFrontendController)
 {
     // Setting XHTML-doctype from doctype
     if (!$typoScriptFrontendController->config['config']['xhtmlDoctype']) {
         $typoScriptFrontendController->config['config']['xhtmlDoctype'] = $typoScriptFrontendController->config['config']['doctype'];
     }
     if ($typoScriptFrontendController->config['config']['xhtmlDoctype']) {
         $typoScriptFrontendController->xhtmlDoctype = $typoScriptFrontendController->config['config']['xhtmlDoctype'];
         // Checking XHTML-docytpe
         switch ((string) $typoScriptFrontendController->config['config']['xhtmlDoctype']) {
             case 'xhtml_trans':
             case 'xhtml_strict':
             case 'xhtml_frames':
                 $typoScriptFrontendController->xhtmlVersion = 100;
                 break;
             case 'xhtml_basic':
                 $typoScriptFrontendController->xhtmlVersion = 105;
                 break;
             case 'xhtml_11':
             case 'xhtml+rdfa_10':
                 $typoScriptFrontendController->xhtmlVersion = 110;
                 break;
             case 'xhtml_2':
                 $typoScriptFrontendController->xhtmlVersion = 200;
                 break;
             default:
                 $typoScriptFrontendController->getPageRenderer()->setRenderXhtml(FALSE);
                 $typoScriptFrontendController->xhtmlDoctype = '';
                 $typoScriptFrontendController->xhtmlVersion = 0;
         }
     } else {
         $typoScriptFrontendController->getPageRenderer()->setRenderXhtml(FALSE);
     }
 }