[FEATURE] Add hook to pagerenderer after compress/concatenate
authorNils Seinschedt <n.seinschedt@neusta.de>
Mon, 16 Jan 2012 19:14:10 +0000 (20:14 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Tue, 17 Jan 2012 07:06:48 +0000 (08:06 +0100)
Implement a hook to be able to influence the concatenated
and compressed resource files before they get wrapped in tags.

Resolves: #33234
Releases: 4.6, 4.7

Change-Id: I0f1a1337ab5b3fbe50692c7f342ecaccc282d052
Reviewed-on: http://review.typo3.org/7822
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
t3lib/class.t3lib_pagerenderer.php

index d7377a0..67eeab5 100644 (file)
@@ -1510,7 +1510,24 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                                // do the file compression
                        $this->doCompress();
                }
-
+                       // postTransform for possible manuipulation of concatenated and compressed files
+               if(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-postTransform'])) {
+                         $params = array(
+                                 'jsLibs' => &$this->jsLibs,
+                                 'jsFooterLibs'   => &$this->jsFooterLibs,
+                                 'jsFiles' => &$this->jsFiles,
+                                 'jsFooterFiles' => &$this->jsFooterFiles,
+                                 'cssFiles' => &$this->cssFiles,
+                                 'headerData' => &$this->headerData,
+                                 'footerData' => &$this->footerData,
+                                 'jsInline' => &$this->jsInline,
+                                 'jsFooterInline' => &$this->jsFooterInline,
+                                 'cssInline' => &$this->cssInline,
+                         );
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-postTransform'] as $hook) {
+                               t3lib_div::callUserFunction($hook, $params, $this);
+                       }
+                }
                $metaTags = implode(LF, $this->metaTags);
 
                        // remove ending slashes from static header block