private function ReassignContents(Layout $prevLayout, Layout $newLayout)
    {
        if ($prevLayout->Equals($newLayout)) {
            return;
        }
        $oldAreas = Area::Schema()->FetchByLayout(false, $prevLayout);
        
        foreach ($oldAreas as $oldArea)
        {
            $newArea = $this->FindNewArea($oldArea, $newLayout);
            if ($newArea) {
                $this->TransferArea($oldArea, $newArea);
            }
            else{
                $this->ClearArea($oldArea);
            }
        }
     }