20 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
73 parent::initializeArguments();
74 $this->registerArgument(
'table',
'string',
'Table name (\'_MOD_\'+module name). If not set, the current module name will be used');
75 $this->registerArgument(
'field',
'string',
'Field name (CSH locallang main key)',
false,
'');
76 $this->registerArgument(
'label',
'string',
'Language label which is wrapped with the CSH',
false,
'');
86 return static::renderStatic(
88 $this->buildRenderChildrenClosure(),
89 $this->renderingContext
99 public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
101 $table = $arguments[
'table'];
102 $field = $arguments[
'field'];
103 $label = $arguments[
'label'];
105 if ($table ===
null) {
106 $currentRequest = $renderingContext->getControllerContext()->getRequest();
107 $moduleName = $currentRequest->getPluginName();
108 $table =
'_MOD_' . $moduleName;
110 if (strpos($label,
'LLL:') === 0) {
114 $label =
'<label>' . htmlspecialchars($label, ENT_QUOTES,
null,
false) .
'</label>';