framework/RedKiteCms/Content/Theme/ThemeAligner.php
public function align(PagesCollectionParser $pagesCollectionParser)
    {
        $themeSlots = $this->findSlotsInTemplates();
        $slots = $this->mergeSlotsByStatus($themeSlots);
        if (!array_key_exists("page", $slots)) {
            return;
        }
        $pageSlots = $slots["page"];
        unset($slots["page"]);

        $files = $this->removeCommonSlots($slots);
        $files = array_merge($files, $this->removePageSlots($pagesCollectionParser, $pageSlots));

        if (!empty($files)) {
            $fs = new Filesystem();
            $fs->remove($files);
        }
    }
public function align(PagesCollectionParser $pagesCollectionParser)
    {
        $themeSlots = $this->findSlotsInTemplates();
        $slots = $this->mergeSlotsByStatus($themeSlots);
        if (!array_key_exists("page", $slots)) {
            return;
        }
        $pageSlots = $slots["page"];
        unset($slots["page"]);

        $files = $this->removeCommonSlots($slots);
        $files = array_merge($files, $this->removePageSlots($pagesCollectionParser, $pageSlots));

        if (!empty($files)) {
            $fs = new Filesystem();
            $fs->remove($files);
        }
    }
Aligns the site slots according with the changes made with the theme in use

@param \RedKiteCms\Content\PageCollection\PagesCollectionParser $pagesCollectionParser