element('Settings/fieldGroup', [ 'panelName' => $panelName, 'panelSettings' => $panelSettings, 'settingName' => $panelName, 'setting' => $panelSettings, ]); $panelHTML = "
{$singleSetting}
"; } else { $panelID = getResolvableID($sectionName, $panelName); $panelHTML .= sprintf('

%s

', $panelID, $panelID, h($panelName)); $groupIssueSeverity = false; foreach ($panelSettings as $singleSettingName => $singleSetting) { $singleSettingHTML = $this->element('Settings/fieldGroup', [ 'panelName' => $panelName, 'panelSettings' => $panelSettings, 'settingName' => $singleSettingName, 'setting' => $singleSetting, ]); $panelHTML .= sprintf('
%s
', $singleSettingHTML); if (!empty($singleSetting['error'])) { $settingVariant = $this->get('variantFromSeverity')[$singleSetting['severity']]; if ($groupIssueSeverity != 'danger') { if ($groupIssueSeverity != 'warning') { $groupIssueSeverity = $settingVariant; } } } } $panelHTML = $this->Bootstrap->genNode('div', [ 'class' => [ 'shadow', 'p-2', 'mb-4', 'rounded', 'settings-group', (!empty($groupIssueSeverity) ? "callout callout-${groupIssueSeverity}" : ''), ($this->get('darkMode') ? 'bg-dark' : 'bg-light') ], ], $panelHTML); } echo $panelHTML;