Document/Subscriber/ArticleSubscriber.php
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)
        );
    }
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)
        );
    }
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 ) ) ; }
Set page-data for given document on given node.

@param ArticleDocument $document
@param NodeInterface $node
@param string $locale
Set page - data for given document on given node .