- foreach ($sections as $section_delta => $section) {
- $sections[$section_delta] = new Section(
- $section['layout_id'],
- $section['layout_settings'],
- array_map(function (array $component) {
- return (new SectionComponent(
- $component['uuid'],
- $component['region'],
- $component['configuration'],
- $component['additional']
- ))->setWeight($component['weight']);
- }, $section['components'])
- );
- }