> $sections gelesene Abschnitte (PageSections::read) */ public function renderAll(array $sections, RenderContext $context): HtmlString { $rendered = []; $first = true; foreach ($sections as $section) { $cells = []; $units = SectionLayouts::units($section['layout']); foreach ($units as $position => $slotUnits) { $widget = $section['slots'][$position] ?? null; if (! is_array($widget)) { continue; } $html = $this->widgets->renderWidget($widget, $context, $first); if ($html !== '') { $first = false; $cells[] = ['units' => $slotUnits, 'html' => $html]; } } if ($cells !== []) { $rendered[] = ['section' => $section, 'cells' => $cells]; } } $html = ''; $last = count($rendered) - 1; foreach ($rendered as $index => $item) { $html .= $this->renderSection($item['section'], $item['cells'], $index); $divider = $item['section']['style']['divider'] ?? 'none'; if ($index < $last && in_array($divider, ['line', 'accent'], true)) { $html .= '
'; } } return new HtmlString($html); } /** * @param array