Document/Subscriber/RoutableSubscriber.php
public function handleReorder(ReorderEvent $event)
    {
        $document = $event->getDocument();
        if (!$document instanceof RoutablePageBehavior || !$document instanceof ParentBehavior) {
            return;
        }

        $parentDocument = $document->getParent();
        if (!$parentDocument instanceof ChildrenBehavior) {
            return;
        }

        $locale = $this->documentInspector->getLocale($parentDocument);
        $propertyName = $this->getRoutePathPropertyName($parentDocument->getStructureType(), $locale);
        foreach ($parentDocument->getChildren() as $childDocument) {
            $node = $this->documentInspector->getNode($childDocument);

            $route = $this->chainRouteGenerator->generate($childDocument);
            $childDocument->setRoutePath($route->getPath());

            $node->setProperty($propertyName, $route->getPath());
        }
    }
public function handleReorder(ReorderEvent $event)
    {
        $document = $event->getDocument();
        if (!$document instanceof RoutablePageBehavior || !$document instanceof ParentBehavior) {
            return;
        }

        $parentDocument = $document->getParent();
        if (!$parentDocument instanceof ChildrenBehavior) {
            return;
        }

        $locale = $this->documentInspector->getLocale($parentDocument);
        $propertyName = $this->getRoutePathPropertyName($parentDocument->getStructureType(), $locale);
        foreach ($parentDocument->getChildren() as $childDocument) {
            $node = $this->documentInspector->getNode($childDocument);

            $route = $this->chainRouteGenerator->generate($childDocument);
            $childDocument->setRoutePath($route->getPath());

            $node->setProperty($propertyName, $route->getPath());
        }
    }
public function handleReorder ( ReorderEvent $ event ) { $ document = $ event -> getDocument ( ) ; if ( ! $ document instanceof RoutablePageBehavior || ! $ document instanceof ParentBehavior ) { return ; } $ parentDocument = $ document -> getParent ( ) ; if ( ! $ parentDocument instanceof ChildrenBehavior ) { return ; } $ locale = $ this -> documentInspector -> getLocale ( $ parentDocument ) ; $ propertyName = $ this -> getRoutePathPropertyName ( $ parentDocument -> getStructureType ( ) , $ locale ) ; foreach ( $ parentDocument -> getChildren ( ) as $ childDocument ) { $ node = $ this -> documentInspector -> getNode ( $ childDocument ) ; $ route = $ this -> chainRouteGenerator -> generate ( $ childDocument ) ; $ childDocument -> setRoutePath ( $ route -> getPath ( ) ) ; $ node -> setProperty ( $ propertyName , $ route -> getPath ( ) ) ; } }
Regenerate routes for siblings on reorder.

@param ReorderEvent $event
Regenerate routes for siblings on reorder .