public function restoreFromHistory(SectionInterface $sectionFromHistory): SectionInterface
    {
        /** @var SectionInterface $activeSection */
        $activeSection = $this->readByHandle($sectionFromHistory->getHandle()); // 1

        /** @var SectionInterface $newSectionHistory */
        $newSectionHistory = $this->copySectionDataToSectionHistoryEntity($activeSection); // 2
        $newSectionHistory->setVersioned(new \DateTime()); // 3
        $version = $this->getHighestVersion($newSectionHistory->getHandle());
        $newSectionHistory->setVersion(1 + $version->toInt());
        $this->sectionHistoryManager->create($newSectionHistory); // 3

        $updatedActiveSection = $this->copySectionHistoryDataToSectionEntity($sectionFromHistory, $activeSection); // 4

        $updatedActiveSection->removeFields(); // 5
        $this->entityManager->persist($updatedActiveSection);
        $this->entityManager->flush();

        $fields = $this->fieldManager->readByHandles($updatedActiveSection->getConfig()->getFields()); // 6

        foreach ($fields as $field) {
            $updatedActiveSection->addField($field);
        } // 7

        $this->entityManager->persist($updatedActiveSection);
        $this->entityManager->flush();

        return $updatedActiveSection;
    }