2 declare(strict_types = 1);
36 $parameterArray = $this->data[
'parameterArray'];
37 $selectItems = $parameterArray[
'fieldConf'][
'config'][
'items'];
39 $selectItemCounter = 0;
40 foreach ($selectItems as $item) {
41 if ($item[1] ===
'--div--') {
46 $fieldValue = $this->data[
'databaseRow'][$this->data[
'fieldName']];
49 'active' => ($fieldValue[0] === (string)$item[1]) ? true :
false,
51 'index' => $selectItemCounter,
58 if (!empty($selectIcons)) {
59 $html[] =
'<div class="t3js-forms-select-single-icons icon-list">';
60 $html[] =
'<div class="row">';
61 foreach ($selectIcons as $i => $selectIcon) {
62 $active = $selectIcon[
'active'] ?
' active' :
'';
63 $html[] =
'<div class="item' . $active .
'">';
64 if (is_array($selectIcon)) {
65 $html[] =
'<a href="#" title="' . htmlspecialchars($selectIcon[
'title'], ENT_COMPAT,
'UTF-8',
false) .
'" data-select-index="' . htmlspecialchars((
string)$selectIcon[
'index']) .
'">';
66 $html[] = $selectIcon[
'icon'];
75 $result[
'html'] = implode(LF, $html);