[BUGFIX] Add namespace argument for inline settings array 63/34163/3
authorFrank Nägler <typo3@naegler.net>
Fri, 14 Nov 2014 12:18:02 +0000 (13:18 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 14 Nov 2014 12:48:00 +0000 (13:48 +0100)
Make it possible to set a namespace for inline settings array

Resolves: #62950
Releaese: master, 6.2
Change-Id: I7170ca42ebc49ef56e4dead1274e541c603e0cbf
Reviewed-on: http://review.typo3.org/34163
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Tested-by: Stefan Froemken <froemken@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/belog/Classes/ViewHelpers/Be/InlineSettingsArrayViewHelper.php

index 4a5a016..f53b635 100644 (file)
@@ -26,14 +26,15 @@ class InlineSettingsArrayViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\Abst
         * Render additional javascript to page
         *
         * @param array $settings Custom JavaScript settings to be added
+        * @param string $namespace Set custom namespace for inline settings array
         * @return void
         * @see \TYPO3\CMS\Backend\Template\DocumentTemplate
         * @see \TYPO3\CMS\Core\Page\PageRenderer
         */
-       public function render(array $settings) {
+       public function render(array $settings, $namespace = '') {
                $doc = $this->getDocInstance();
                $pageRenderer = $doc->getPageRenderer();
-               $pageRenderer->addInlineSettingArray('', $settings);
+               $pageRenderer->addInlineSettingArray($namespace, $settings);
        }
 
 }