protected function getExtensionData(BasePageDocument $document)
    {
        $extensionData = [];

        foreach ($document->getExtensionsData()->toArray() as $extensionName => $extensionProperties) {
            /** @var \Sulu\Bundle\PageBundle\Content\Structure\ExcerptStructureExtension $extension */
            $extension = $this->extensionManager->getExtension($document->getStructureType(), $extensionName);

            if ($extension instanceof ExportExtensionInterface) {
                $extensionData[$extensionName] = $extension->export($extensionProperties, $this->format);
            }
        }

        return $extensionData;
    }