[TASK] Remove usages of getTemplateVariableContainer 72/49972/2
authorClaus Due <claus@namelesscoder.net>
Mon, 19 Sep 2016 21:15:04 +0000 (23:15 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 20 Sep 2016 12:53:40 +0000 (14:53 +0200)
The method is deprecated, replaced by getVariableProvider.
This change replaces remaining old usages with
the new, correct usage.

Change-Id: Ie05f6f2e10b92a4c5b05d7b028c2fc5be3814ec9
Resolves: #77969
Releases: master
Reviewed-on: https://review.typo3.org/49972
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/RenderChildrenViewHelper.php
typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextTest.php

index ec90d3d..f32cc55 100644 (file)
@@ -162,7 +162,7 @@ class FlashMessagesViewHelper extends AbstractTagBasedViewHelper
      */
     protected function renderFromTemplate(array $flashMessages, $as)
     {
-        $templateVariableContainer = $this->renderingContext->getTemplateVariableContainer();
+        $templateVariableContainer = $this->renderingContext->getVariableProvider();
         $templateVariableContainer->add($as, $flashMessages);
         $content = $this->renderChildren();
         $templateVariableContainer->remove($as);
index 51610f3..e4edb26 100644 (file)
@@ -90,7 +90,7 @@ class RenderChildrenViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abstract
      */
     protected function addArgumentsToTemplateVariableContainer(array $arguments)
     {
-        $templateVariableContainer = $this->getWidgetRenderingContext()->getTemplateVariableContainer();
+        $templateVariableContainer = $this->getWidgetRenderingContext()->getVariableProvider();
         foreach ($arguments as $identifier => $value) {
             $templateVariableContainer->add($identifier, $value);
         }
@@ -104,7 +104,7 @@ class RenderChildrenViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abstract
      */
     protected function removeArgumentsFromTemplateVariableContainer(array $arguments)
     {
-        $templateVariableContainer = $this->getWidgetRenderingContext()->getTemplateVariableContainer();
+        $templateVariableContainer = $this->getWidgetRenderingContext()->getVariableProvider();
         foreach ($arguments as $identifier => $value) {
             $templateVariableContainer->remove($identifier);
         }
index d5a81f7..959c89d 100644 (file)
@@ -72,7 +72,7 @@ class RenderingContextTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     {
         $templateVariableContainer = $this->createMock(StandardVariableProvider::class);
         $this->renderingContext->setVariableProvider($templateVariableContainer);
-        $this->assertSame($this->renderingContext->getTemplateVariableContainer(), $templateVariableContainer, 'Template Variable Container could not be read out again.');
+        $this->assertSame($this->renderingContext->getVariableProvider(), $templateVariableContainer, 'Template Variable Container could not be read out again.');
     }
 
     /**