public function build(View $view, $updatePage = true)
    {
        $builtWidgetMap = [];

        $widgetMaps = $this->contextualViewWarmer->warm($view);

        $slots = $this->removeOverwritedWidgetMaps($widgetMaps);

        $this->removeDeletedWidgetMaps($slots);

        foreach ($slots as $slot => $slotWidgetMaps) {
            $mainWidgetMap = null;
            $builtWidgetMap[$slot] = [];

            $rootWidgetMap = $this->findRootWidgetMap($slotWidgetMaps);

            if ($rootWidgetMap) {
                $builtWidgetMap[$slot][] = $rootWidgetMap;
                $builtWidgetMap = $this->orderizeWidgetMap($rootWidgetMap, $builtWidgetMap, $slot, $slotWidgetMaps, $view);
            }
        }

        if ($updatePage) {
            $view->setBuiltWidgetMap($builtWidgetMap);
        }

        return $builtWidgetMap;
    }