Fixed bug #14565: There is no way to disable compress and concatenate
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_pagerenderer.php
index 496e7f2..395c0c0 100644 (file)
@@ -311,10 +311,11 @@ class t3lib_PageRenderer implements t3lib_Singleton {
 
        /*****************************************************/
        /*                                                   */
-       /*  Public Enablers                                  */
+       /*  Public Enablers / Disablers                      */
        /*                                                   */
        /*                                                   */
        /*****************************************************/
+
        /**
         * Enables MoveJsFromHeaderToFooter
         *
@@ -325,6 +326,16 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                $this->moveJsFromHeaderToFooter = TRUE;
        }
 
+       /**
+        * Disables MoveJsFromHeaderToFooter
+        *
+        * @param void
+        * @return void
+        */
+       public function disableMoveJsFromHeaderToFooter() {
+               $this->moveJsFromHeaderToFooter = FALSE;
+       }
+
        /**
         * Enables compression of javascript
         *
@@ -335,6 +346,16 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                $this->compressJavascript = TRUE;
        }
 
+       /**
+        * Disables compression of javascript
+        *
+        * @param void
+        * @return void
+        */
+       public function disableCompressJavascript() {
+               $this->compressJavascript = FALSE;
+       }
+
        /**
         * Enables compression of css
         *
@@ -346,6 +367,15 @@ class t3lib_PageRenderer implements t3lib_Singleton {
        }
 
        /**
+        * Disables compression of css
+        *
+        * @param void
+        * @return void
+        */
+       public function disableCompressCss() {
+               $this->compressCss = FALSE;
+       }
+
        /**
         * Enables concatenation of js/css files
         *
@@ -356,6 +386,16 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                $this->concatenateFiles = TRUE;
        }
 
+       /**
+        * Disables concatenation of js/css files
+        *
+        * @param void
+        * @return void
+        */
+       public function disableConcatenateFiles() {
+               $this->concatenateFiles = FALSE;
+       }
+
        /**
         * Sets removal of all line breaks in template
         *
@@ -366,6 +406,30 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                $this->removeLineBreaksFromTemplate = TRUE;
        }
 
+       /**
+        * Unsets removal of all line breaks in template
+        *
+        * @param void
+        * @return void
+        */
+       public function disableRemoveLineBreaksFromTemplate() {
+               $this->removeLineBreaksFromTemplate = FALSE;
+       }
+
+       /**
+        * Enables Debug Mode
+        * This is a shortcut to switch off all compress/concatenate features to enable easier debug
+        *
+        * @param void
+        * @return void
+        */
+       public function enableDebugMode() {
+               $this->compressJavascript = FALSE;
+               $this->compressCss = FALSE;
+               $this->concatenateFiles = FALSE;
+               $this->removeLineBreaksFromTemplate = FALSE;
+       }
+
        /*****************************************************/
        /*                                                   */
        /*  Public Getters                                   */