19 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
71 parent::initializeArguments();
72 $this->registerArgument(
'table',
'string',
'Table name (\'_MOD_\'+module name). If not set, the current module name will be used');
73 $this->registerArgument(
'field',
'string',
'Field name (CSH locallang main key)',
false,
'');
74 $this->registerArgument(
'wrap',
'string',
'Markup to wrap around the CSH, split by "|"',
false,
'');
84 return static::renderStatic(
86 $this->buildRenderChildrenClosure(),
87 $this->renderingContext
97 public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
99 $table = $arguments[
'table'];
100 $field = $arguments[
'field'];
101 $wrap = $arguments[
'wrap'];
103 if ($table ===
null) {
104 $currentRequest = $renderingContext->getControllerContext()->getRequest();
105 $moduleName = $currentRequest->getPluginName();
106 $table =
'_MOD_' . $moduleName;
108 $content = (string)$renderChildrenClosure();
109 if ($content !==
'') {