Added feature #16580: render-postProcess Hook in t3lib_PageRenderer::render() (Thanks...
authorSteffen Gebert <steffen.gebert@typo3.org>
Thu, 30 Dec 2010 09:05:28 +0000 (09:05 +0000)
committerSteffen Gebert <steffen.gebert@typo3.org>
Thu, 30 Dec 2010 09:05:28 +0000 (09:05 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9965 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_pagerenderer.php

index a6caa04..6186432 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,13 @@
-2010-12-29  Christian Kuuhn  <lolli@schwarzbuch>
+2010-12-30  Steffen Gebert  <steffen@steffen-gebert.de>
+
+       * Added feature #16580: render-postProcess Hook in t3lib_PageRenderer::render() (Thanks to Morton Jonuschat)
+
+2010-12-29  Christian Kuuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #16849: [Unit tests] fixPermissions* tests rely on availability of posix_getegid() (Thanks to Steffen Gebert)
        * Fixed bug #11286: Caching of pagesections uses superfluos serialize() call (Thanks to Rupert Germann)
 
-2010-12-28  Christian Kuuhn  <lolli@schwarzbuch>
+2010-12-28  Christian Kuuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #16840: Remove misc/ directory and deprecate t3lib_superadmin
 
index 78d7f3b..1d2bb27 100644 (file)
@@ -1478,27 +1478,61 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                        $jsInline = '';
                }
 
+                       // postRenderHook for possible manipulation
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-postProcess'])) {
+                       $params = array (
+                               'jsLibs'               => &$jsLibs,
+                               'jsFiles'              => &$jsFiles,
+                               'jsFooterFiles'        => &$jsFooterFiles,
+                               'cssFiles'             => &$cssFiles,
+                               'headerData'           => &$this->headerData,
+                               'footerData'           => &$this->footerData,
+                               'jsInline'             => &$jsInline,
+                               'cssInline'            => &$cssInline,
+                               'xmlPrologAndDocType'  => &$this->xmlPrologAndDocType,
+                               'htmlTag'              => &$this->htmlTag,
+                               'headTag'              => &$this->headTag,
+                               'charSet'              => &$this->charSet,
+                               'metaCharsetTag'       => &$this->metaCharsetTag,
+                               'shortcutTag'          => &$this->shortcutTag,
+                               'inlineComments'       => &$this->inlineComments,
+                               'baseUrl'              => &$this->baseUrl,
+                               'baseUrlTag'           => &$this->baseUrlTag,
+                               'favIcon'              => &$this->favIcon,
+                               'iconMimeType'         => &$this->iconMimeType,
+                               'titleTag'             => &$this->titleTag,
+                               'title'                => &$this->title,
+                               'metaTags'             => &$metaTags,
+                               'jsFooterInline'       => &$jsFooterInline,
+                               'jsFooterLibs'         => &$jsFooterLibs,
+                               'bodyContent'          => &$this->bodyContent,
+                       );
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-postProcess'] as $hook) {
+                               t3lib_div::callUserFunction($hook, $params, $this);
+                       }
+               }
+
                $markerArray = array(
                        'XMLPROLOG_DOCTYPE' => $this->xmlPrologAndDocType,
-                       'HTMLTAG' => $this->htmlTag,
-                       'HEADTAG' => $this->headTag,
-                       'METACHARSET' => $this->charSet ? str_replace('|', htmlspecialchars($this->charSet), $this->metaCharsetTag) : '',
-                       'INLINECOMMENT' => $this->inlineComments ? LF . LF . '<!-- ' . LF . implode(LF, $this->inlineComments) . '-->' . LF . LF : '',
-                       'BASEURL' => $this->baseUrl ? str_replace('|', $this->baseUrl, $this->baseUrlTag) : '',
-                       'SHORTCUT' => $this->favIcon ? sprintf($this->shortcutTag, htmlspecialchars($this->favIcon), $this->iconMimeType) : '',
-                       'CSS_INCLUDE' => $cssFiles,
-                       'CSS_INLINE' => $cssInline,
-                       'JS_INLINE' => $jsInline,
-                       'JS_INCLUDE' => $jsFiles,
-                       'JS_LIBS' => $jsLibs,
-                       'TITLE' => $this->title ? str_replace('|', htmlspecialchars($this->title), $this->titleTag) : '',
-                       'META' => $metaTags,
-                       'HEADERDATA' => $this->headerData ? implode(LF, $this->headerData) : '',
-                       'FOOTERDATA' => $this->footerData ? implode(LF, $this->footerData) : '',
-                       'JS_LIBS_FOOTER' => $jsFooterLibs,
+                       'HTMLTAG'           => $this->htmlTag,
+                       'HEADTAG'           => $this->headTag,
+                       'METACHARSET'       => $this->charSet ? str_replace('|', htmlspecialchars($this->charSet), $this->metaCharsetTag) : '',
+                       'INLINECOMMENT'     => $this->inlineComments ? LF . LF . '<!-- ' . LF . implode(LF, $this->inlineComments) . '-->' . LF . LF : '',
+                       'BASEURL'           => $this->baseUrl ? str_replace('|', $this->baseUrl, $this->baseUrlTag) : '',
+                       'SHORTCUT'          => $this->favIcon ? sprintf($this->shortcutTag, htmlspecialchars($this->favIcon), $this->iconMimeType) : '',
+                       'CSS_INCLUDE'       => $cssFiles,
+                       'CSS_INLINE'        => $cssInline,
+                       'JS_INLINE'         => $jsInline,
+                       'JS_INCLUDE'        => $jsFiles,
+                       'JS_LIBS'           => $jsLibs,
+                       'TITLE'             => $this->title ? str_replace('|', htmlspecialchars($this->title), $this->titleTag) : '',
+                       'META'              => $metaTags,
+                       'HEADERDATA'        => $this->headerData ? implode(LF, $this->headerData) : '',
+                       'FOOTERDATA'        => $this->footerData ? implode(LF, $this->footerData) : '',
+                       'JS_LIBS_FOOTER'    => $jsFooterLibs,
                        'JS_INCLUDE_FOOTER' => $jsFooterFiles,
-                       'JS_INLINE_FOOTER' => $jsFooterInline,
-                       'BODY' => $this->bodyContent,
+                       'JS_INLINE_FOOTER'  => $jsFooterInline,
+                       'BODY'              => $this->bodyContent,
                );
 
                $markerArray = array_map('trim', $markerArray);