src/Sulu/Component/Content/Document/Subscriber/ResourceSegmentSubscriber.php
public function handlePersistRoute(PublishEvent $event)
    {
        /** @var ResourceSegmentBehavior $document */
        $document = $event->getDocument();

        if (!$this->supports($document)) {
            return;
        }

        if (!$event->getLocale()) {
            return;
        }

        if ($document instanceof HomeDocument) {
            return;
        }

        if ($document instanceof RedirectTypeBehavior && RedirectType::NONE !== $document->getRedirectType()) {
            return;
        }

        $this->persistRoute($document);
    }
public function handlePersistRoute(PublishEvent $event)
    {
        /** @var ResourceSegmentBehavior $document */
        $document = $event->getDocument();

        if (!$this->supports($document)) {
            return;
        }

        if (!$event->getLocale()) {
            return;
        }

        if ($document instanceof HomeDocument) {
            return;
        }

        if ($document instanceof RedirectTypeBehavior && RedirectType::NONE !== $document->getRedirectType()) {
            return;
        }

        $this->persistRoute($document);
    }
public function handlePersistRoute ( PublishEvent $ event ) { /** @var ResourceSegmentBehavior $document */ $ document = $ event -> getDocument ( ) ; if ( ! $ this -> supports ( $ document ) ) { return ; } if ( ! $ event -> getLocale ( ) ) { return ; } if ( $ document instanceof HomeDocument ) { return ; } if ( $ document instanceof RedirectTypeBehavior && RedirectType :: NONE !== $ document -> getRedirectType ( ) ) { return ; } $ this -> persistRoute ( $ document ) ; }
Creates or updates the route for the document.

@param PublishEvent $event
Creates or updates the route for the document .