> $sections gelesene Abschnitte (PageSections::read) */ public function renderAll(array $sections, RenderContext $context): HtmlString { $rendered = []; $first = true; foreach ($sections as $section) { $cells = []; $shown = false; $units = SectionLayouts::units($section['layout']); foreach ($units as $position => $slotUnits) { $widget = $section['slots'][$position] ?? null; $html = is_array($widget) ? $this->widgets->renderWidget($widget, $context, $first) : ''; if ($html !== '') { $first = false; $shown = true; } // Auch ein leerer Platz (oder ein Widget, das nichts darstellt) bleibt eine Zelle, damit die Plätze daneben stehen bleiben. $cells[] = ['units' => $slotUnits, 'html' => $html]; } if ($shown) { $rendered[] = ['section' => $section, 'cells' => $cells]; } } $html = ''; $last = count($rendered) - 1; foreach ($rendered as $index => $item) { $html .= $this->renderSection($item['section'], $item['cells'], $index, $context); $divider = $item['section']['style']['divider'] ?? 'none'; if ($index < $last && in_array($divider, ['line', 'accent'], true)) { $html .= '
'; } } return new HtmlString($html); } /** * @param array