src/Sulu/Bundle/HttpCacheBundle/EventSubscriber/InvalidationSubscriber.php
private function invalidateDocumentExcerpt(ExtensionBehavior $document)
    {
        if (!$this->cacheManager) {
            return;
        }

        $extensionData = $document->getExtensionsData();
        if (!isset($extensionData['excerpt'])) {
            return;
        }

        $excerpt = $extensionData['excerpt'];

        if (isset($excerpt['tags'])) {
            foreach ($this->tagManager->resolveTagNames($excerpt['tags']) as $tag) {
                $this->cacheManager->invalidateReference('tag', $tag);
            }
        }

        if (isset($excerpt['categories'])) {
            foreach ($excerpt['categories'] as $category) {
                $this->cacheManager->invalidateReference('category', $category);
            }
        }
    }
private function invalidateDocumentExcerpt(ExtensionBehavior $document)
    {
        if (!$this->cacheManager) {
            return;
        }

        $extensionData = $document->getExtensionsData();
        if (!isset($extensionData['excerpt'])) {
            return;
        }

        $excerpt = $extensionData['excerpt'];

        if (isset($excerpt['tags'])) {
            foreach ($this->tagManager->resolveTagNames($excerpt['tags']) as $tag) {
                $this->cacheManager->invalidateReference('tag', $tag);
            }
        }

        if (isset($excerpt['categories'])) {
            foreach ($excerpt['categories'] as $category) {
                $this->cacheManager->invalidateReference('category', $category);
            }
        }
    }
private function invalidateDocumentExcerpt ( ExtensionBehavior $ document ) { if ( ! $ this -> cacheManager ) { return ; } $ extensionData = $ document -> getExtensionsData ( ) ; if ( ! isset ( $ extensionData [ 'excerpt' ] ) ) { return ; } $ excerpt = $ extensionData [ 'excerpt' ] ; if ( isset ( $ excerpt [ 'tags' ] ) ) { foreach ( $ this -> tagManager -> resolveTagNames ( $ excerpt [ 'tags' ] ) as $ tag ) { $ this -> cacheManager -> invalidateReference ( 'tag' , $ tag ) ; } } if ( isset ( $ excerpt [ 'categories' ] ) ) { foreach ( $ excerpt [ 'categories' ] as $ category ) { $ this -> cacheManager -> invalidateReference ( 'category' , $ category ) ; } } }
Invalidates all tags and categories from excerpt extension.

@param ExtensionBehavior $document
Invalidates all tags and categories from excerpt extension .