private function setPageData(ArticleDocument $document, NodeInterface $node, $locale)
    {
        $pages = [
            [
                'uuid' => $document->getUuid(),
                'title' => $document->getPageTitle() ?: $document->getTitle(),
                'routePath' => $document->getRoutePath(),
                'pageNumber' => $document->getPageNumber(),
            ],
        ];

        foreach ($document->getChildren() as $child) {
            if ($child instanceof ArticlePageDocument
                && LocalizationState::GHOST !== $this->documentInspector->getLocalizationState($child)
            ) {
                $pages[] = [
                    'uuid' => $child->getUuid(),
                    'title' => $child->getPageTitle(),
                    'routePath' => $child->getRoutePath(),
                    'pageNumber' => $child->getPageNumber(),
                ];
            }
        }

        $pages = SortUtils::multisort($pages, '[pageNumber]');

        $document->setPages($pages);
        $node->setProperty(
            $this->propertyEncoder->localizedSystemName(self::PAGES_PROPERTY, $locale),
            json_encode($pages)
        );
    }