Document/Subscriber/RoutableSubscriber.php
private function removeChildRoutes(ChildrenBehavior $document, $locale)
    {
        foreach ($document->getChildren() as $child) {
            if ($child instanceof RoutablePageBehavior) {
                $this->removeChildRoute($child, $locale);
            }

            if ($child instanceof ChildrenBehavior) {
                $this->removeChildRoutes($child, $locale);
            }
        }
    }
private function removeChildRoutes(ChildrenBehavior $document, $locale)
    {
        foreach ($document->getChildren() as $child) {
            if ($child instanceof RoutablePageBehavior) {
                $this->removeChildRoute($child, $locale);
            }

            if ($child instanceof ChildrenBehavior) {
                $this->removeChildRoutes($child, $locale);
            }
        }
    }
private function removeChildRoutes ( ChildrenBehavior $ document , $ locale ) { foreach ( $ document -> getChildren ( ) as $ child ) { if ( $ child instanceof RoutablePageBehavior ) { $ this -> removeChildRoute ( $ child , $ locale ) ; } if ( $ child instanceof ChildrenBehavior ) { $ this -> removeChildRoutes ( $ child , $ locale ) ; } } }
Iterate over children and remove routes.

@param ChildrenBehavior $document
@param string $locale
Iterate over children and remove routes .