35 'renderType' =>
'tcaDescription',
46 'renderType' =>
'resetSelection',
56 'localizationStateSelector' => [
57 'renderType' =>
'localizationStateSelector',
59 'otherLanguageContent' => [
60 'renderType' =>
'otherLanguageContent',
62 'localizationStateSelector'
65 'defaultLanguageDifferences' => [
66 'renderType' =>
'defaultLanguageDifferences',
68 'otherLanguageContent',
83 $parameterArray = $this->data[
'parameterArray'];
85 $config = $parameterArray[
'fieldConf'][
'config'];
86 $selectItems = $parameterArray[
'fieldConf'][
'config'][
'items'];
87 $disabled = !empty($config[
'readOnly']);
90 $itemArray = array_flip($parameterArray[
'itemFormElValue']);
94 foreach ($selectItems as $i => $item) {
98 if (isset($itemArray[$value])) {
99 $attributes[
'selected'] =
'selected';
100 unset($itemArray[$value]);
103 if ((
string)$value ===
'--div--') {
104 $attributes[
'disabled'] =
'disabled';
105 $attributes[
'class'] =
'formcontrol-select-divider';
113 $fieldInformationHtml = $fieldInformationResult[
'html'];
117 $fieldControlHtml = $fieldControlResult[
'html'];
121 $fieldWizardHtml = $fieldWizardResult[
'html'];
125 $html[] =
'<div class="formengine-field-item t3js-formengine-field-item">';
126 $html[] = $fieldInformationHtml;
127 $html[] =
'<div class="form-control-wrap" style="max-width: ' . $width .
'px">';
128 $html[] =
'<div class="form-wizards-wrap form-wizards-aside">';
129 $html[] =
'<div class="form-wizards-element">';
132 $html[] =
'<input type="hidden" name="' . htmlspecialchars($parameterArray[
'itemFormElName']) .
'" value="">';
134 $html[] = $selectElement;
137 if (!empty($fieldControlHtml)) {
138 $html[] =
'<div class="form-wizards-items-aside">';
139 $html[] = $fieldControlHtml;
144 $html[] =
'<em>' . htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.holdDownCTRL')) .
'</em>';
146 if (!empty($fieldWizardHtml)) {
147 $html[] =
'<div class="form-wizards-items-bottom">';
148 $html[] = $fieldWizardHtml;
155 $resultArray[
'html'] = implode(LF, $html);
167 protected function renderSelectElement(array $optionElements, array $parameterArray, array $config)
169 $selectItems = $parameterArray[
'fieldConf'][
'config'][
'items'];
170 $size = (int)$config[
'size'];
171 $cssPrefix = $size === 1 ?
'tceforms-select' :
'tceforms-multiselect';
173 if ($config[
'autoSizeMax']) {
175 count($selectItems) + 1,
177 $config[
'autoSizeMax']
182 'name' => $parameterArray[
'itemFormElName'] .
'[]',
183 'multiple' =>
'multiple',
184 'onchange' => implode(
'', $parameterArray[
'fieldChangeFunc']),
186 'class' =>
'form-control ' . $cssPrefix,
190 $attributes[
'size'] = $size;
192 if ($config[
'readOnly']) {
193 $attributes[
'disabled'] =
'disabled';
197 $html[] =
'<select ' . GeneralUtility::implodeAttributes($attributes,
true) .
'>';
198 $html[] = implode(LF, $optionElements);
199 $html[] =
'</select>';
201 return implode(LF, $html);
214 $attributes[
'value'] = $value;
216 '<option ' . GeneralUtility::implodeAttributes($attributes,
true) .
'>',
222 return implode(
'', $html);