18 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
19 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
20 use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
28 use CompileWithRenderStatic;
35 $this->registerArgument(
'parameters',
'string',
'Is a set of GET params to send to route tce_db (SimpleDataHandlerController). Example: "&cmd[tt_content][123][move]=456" or "&data[tt_content][123][hidden]=1&data[tt_content][123][title]=Hello%20World',
true);
36 $this->registerArgument(
'redirectUrl',
'string',
'Redirect URL if any other that \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv(\'REQUEST_URI\') is preferred',
false,
'');
49 public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
52 'redirect' => $arguments[
'redirectUrl'] ?: GeneralUtility::getIndpEnv(
'REQUEST_URI')
54 if (isset($arguments[
'parameters'])) {
55 $parametersArray = GeneralUtility::explodeUrl2Array($arguments[
'parameters']);
56 $urlParameters += $parametersArray;
59 $uriBuilder = GeneralUtility::makeInstance(\
TYPO3\CMS\Backend\Routing\UriBuilder::class);
60 return (
string)$uriBuilder->buildUriFromRoute(
'tce_db', $urlParameters);