UrlInvalidator/UrlInvalidatorService.php
public function loadUrlsFromDocument($type, SeoAwareInterface $document)
    {
        if ($this->invalidateSeoUrls) {
            // Default behavior.
            $urls = $document->getUrls();

            if (is_array($urls) || $urls instanceof \Traversable) {
                /** @var UrlObject $url */
                foreach ($urls as $url) {
                    $this->addUrl($url->getUrl());
                }
            }
        }
        // Special behavior from bundles.
        foreach ($this->urlCollectors as $collector) {
            $this->addUrls($collector->getDocumentUrls($type, $document, $this->router));
            $this->addMultipleDocumentParameters($collector->getDocumentParameters($type, $document));
        }
    }
public function loadUrlsFromDocument($type, SeoAwareInterface $document)
    {
        if ($this->invalidateSeoUrls) {
            // Default behavior.
            $urls = $document->getUrls();

            if (is_array($urls) || $urls instanceof \Traversable) {
                /** @var UrlObject $url */
                foreach ($urls as $url) {
                    $this->addUrl($url->getUrl());
                }
            }
        }
        // Special behavior from bundles.
        foreach ($this->urlCollectors as $collector) {
            $this->addUrls($collector->getDocumentUrls($type, $document, $this->router));
            $this->addMultipleDocumentParameters($collector->getDocumentParameters($type, $document));
        }
    }
public function loadUrlsFromDocument ( $ type , SeoAwareInterface $ document ) { if ( $ this -> invalidateSeoUrls ) { // Default behavior. $ urls = $ document -> getUrls ( ) ; if ( is_array ( $ urls ) || $ urls instanceof \ Traversable ) { /** @var UrlObject $url */ foreach ( $ urls as $ url ) { $ this -> addUrl ( $ url -> getUrl ( ) ) ; } } } // Special behavior from bundles. foreach ( $ this -> urlCollectors as $ collector ) { $ this -> addUrls ( $ collector -> getDocumentUrls ( $ type , $ document , $ this -> router ) ) ; $ this -> addMultipleDocumentParameters ( $ collector -> getDocumentParameters ( $ type , $ document ) ) ; } }
Collect all urls for invalidation.

@param string            $type
@param SeoAwareInterface $document
Collect all urls for invalidation .