2 namespace TYPO3\CMS\Backend\Form\Element;
33 $parameterArray = $this->data[
'parameterArray'];
34 $config = $parameterArray[
'fieldConf'][
'config'];
35 $itemValue = $parameterArray[
'itemFormElValue'];
37 if ($config[
'format']) {
38 $itemValue = $this->
formatValue($config, $itemValue);
40 if (!$config[
'pass_content']) {
41 $itemValue = htmlspecialchars($itemValue);
45 $rows = (int)$config[
'rows'];
47 if ($rows > 1 || $config[
'type'] ===
'text') {
48 if (!$config[
'pass_content']) {
49 $itemValue = nl2br($itemValue);
54 <div class="form-control-wrap"' . ($width ?
' style="max-width: ' . $width .
'px"' :
'') .
'>
55 <textarea class="form-control" rows="' . $rows .
'" disabled>' . $itemValue .
'</textarea>
62 <div class="form-control-wrap"' . ($width ?
' style="max-width: ' . $width .
'px"' :
'') .
'>
63 <input class="form-control" value="' . $itemValue .
'" type="text" disabled>
66 $resultArray[
'html'] = $html;
79 $format = trim($config[
'format']);
83 $option = trim($config[
'format.'][
'option']);
85 if ($config[
'format.'][
'strftime']) {
86 $value = strftime($option, $itemValue);
88 $value = date($option, $itemValue);
91 $value = date(
'd-m-Y', $itemValue);
96 if ($config[
'format.'][
'appendAge']) {
99 $this->
getLanguageService()->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')
101 $value .=
' (' . $age .
')';
107 if ($itemValue !==
'' && !is_null($itemValue)) {
108 $itemValue = date(
'H:i d-m-Y', (
int)$itemValue);
113 if ($itemValue !==
'' && !is_null($itemValue)) {
114 $itemValue = date(
'H:i', (
int)$itemValue);
119 if ($itemValue !==
'' && !is_null($itemValue)) {
120 $itemValue = date(
'H:i:s', (
int)$itemValue);
125 if ($itemValue !==
'' && !is_null($itemValue)) {
126 $itemValue = date(
'Y', (
int)$itemValue);
130 $baseArr = array(
'dec' =>
'd',
'hex' =>
'x',
'HEX' =>
'X',
'oct' =>
'o',
'bin' =>
'b');
131 $base = trim($config[
'format.'][
'base']);
132 $format = $baseArr[$base] ?:
'd';
133 $itemValue = sprintf(
'%' . $format, $itemValue);
137 $itemValue = sprintf(
'%.' . $precision .
'f', $itemValue);
140 $format = trim($config[
'format.'][
'option']);
141 $itemValue = sprintf(
'%' . $format, $itemValue);
144 $itemValue = md5($itemValue);
150 if ($config[
'format.'][
'appendByteSize']) {
151 $value .=
' (' . $itemValue .
')';
156 $func = trim($config[
'format.'][
'userFunc']);
159 'value' => $itemValue,
160 'args' => $config[
'format.'][
'userFunc'],