src/Sulu/Component/Content/Document/Subscriber/StructureRemoveSubscriber.php
private function removeRoute(StructureBehavior $document)
    {
        foreach ($this->documentInspector->getReferrers($document) as $referrer) {
            if ($referrer instanceof RouteBehavior) {
                $this->documentManager->remove($referrer);
            }
        }
    }
private function removeRoute(StructureBehavior $document)
    {
        foreach ($this->documentInspector->getReferrers($document) as $referrer) {
            if ($referrer instanceof RouteBehavior) {
                $this->documentManager->remove($referrer);
            }
        }
    }
private function removeRoute ( StructureBehavior $ document ) { foreach ( $ this -> documentInspector -> getReferrers ( $ document ) as $ referrer ) { if ( $ referrer instanceof RouteBehavior ) { $ this -> documentManager -> remove ( $ referrer ) ; } } }
Removes related route of given document.

@param StructureBehavior $document
Removes related route of given document .