Document/Subscriber/RoutableSubscriber.php
private function removeChildRoute(RoutablePageBehavior $document, $locale)
    {
        $route = $this->routeRepository->findByPath($document->getRoutePath(), $locale);
        if ($route) {
            $this->entityManager->remove($route);
        }
    }
private function removeChildRoute(RoutablePageBehavior $document, $locale)
    {
        $route = $this->routeRepository->findByPath($document->getRoutePath(), $locale);
        if ($route) {
            $this->entityManager->remove($route);
        }
    }
private function removeChildRoute ( RoutablePageBehavior $ document , $ locale ) { $ route = $ this -> routeRepository -> findByPath ( $ document -> getRoutePath ( ) , $ locale ) ; if ( $ route ) { $ this -> entityManager -> remove ( $ route ) ; } }
Removes route if exists.

@param RoutablePageBehavior $document
@param string $locale
Removes route if exists .