diff --git a/typo3/sysext/form/Classes/ViewHelpers/RenderAllFormValuesViewHelper.php b/typo3/sysext/form/Classes/ViewHelpers/RenderAllFormValuesViewHelper.php index 86b25bc705e27551273d2a4412869e316faf29cb..a302e04a40694042cdc71b0ebeebc370031c4822 100644 --- a/typo3/sysext/form/Classes/ViewHelpers/RenderAllFormValuesViewHelper.php +++ b/typo3/sysext/form/Classes/ViewHelpers/RenderAllFormValuesViewHelper.php @@ -100,9 +100,9 @@ class RenderAllFormValuesViewHelper extends AbstractViewHelper 'processedValue' => self::processElementValue($element, $value, $renderChildrenClosure, $renderingContext), 'isMultiValue' => is_array($value) || $value instanceof \Iterator ]; - $renderingContext->getTemplateVariableContainer()->add($as, $formValue); + $renderingContext->getVariableProvider()->add($as, $formValue); $output .= $renderChildrenClosure(); - $renderingContext->getTemplateVariableContainer()->remove($as); + $renderingContext->getVariableProvider()->remove($as); } return $output; } diff --git a/typo3/sysext/form/Classes/ViewHelpers/RenderViewHelper.php b/typo3/sysext/form/Classes/ViewHelpers/RenderViewHelper.php index 7882ba6ae60d90f9f7b0fb75dd68cdb395bb4324..05237f3f6681ad30d9df0992820b39faf4c8367f 100644 --- a/typo3/sysext/form/Classes/ViewHelpers/RenderViewHelper.php +++ b/typo3/sysext/form/Classes/ViewHelpers/RenderViewHelper.php @@ -18,7 +18,9 @@ namespace TYPO3\CMS\Form\ViewHelpers; */ use TYPO3\CMS\Core\Utility\ArrayUtility; +use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Mvc\Web\Response; +use TYPO3\CMS\Extbase\Object\ObjectManager; use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper; use TYPO3\CMS\Form\Domain\Factory\ArrayFormFactory; use TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManagerInterface; @@ -78,8 +80,9 @@ class RenderViewHelper extends AbstractViewHelper $prototypeName = $arguments['prototypeName']; $overrideConfiguration = $arguments['overrideConfiguration']; + $objectManager = GeneralUtility::makeInstance(ObjectManager::class); if (!empty($persistenceIdentifier)) { - $formPersistenceManager = $renderingContext->getObjectManager()->get(FormPersistenceManagerInterface::class); + $formPersistenceManager = $objectManager->get(FormPersistenceManagerInterface::class); $formConfiguration = $formPersistenceManager->load($persistenceIdentifier); ArrayUtility::mergeRecursiveWithOverrule( $formConfiguration, @@ -93,9 +96,9 @@ class RenderViewHelper extends AbstractViewHelper $prototypeName = isset($overrideConfiguration['prototypeName']) ? $overrideConfiguration['prototypeName'] : 'standard'; } - $factory = $renderingContext->getObjectManager()->get($factoryClass); + $factory = $objectManager->get($factoryClass); $formDefinition = $factory->build($overrideConfiguration, $prototypeName); - $response = $renderingContext->getObjectManager()->get(Response::class, $renderingContext->getControllerContext()->getResponse()); + $response = $objectManager->get(Response::class, $renderingContext->getControllerContext()->getResponse()); $form = $formDefinition->bind($renderingContext->getControllerContext()->getRequest(), $response); return $form->render(); }