src/Bridge/Doctrine/EventListener/PurgeHttpCacheListener.php
public function onFlush(OnFlushEventArgs $eventArgs): void
    {
        $em = $eventArgs->getEntityManager();
        $uow = $em->getUnitOfWork();

        foreach ($uow->getScheduledEntityInsertions() as $entity) {
            $this->gatherResourceAndItemTags($entity, false);
            $this->gatherRelationTags($em, $entity);
        }

        foreach ($uow->getScheduledEntityUpdates() as $entity) {
            $this->gatherResourceAndItemTags($entity, true);
            $this->gatherRelationTags($em, $entity);
        }

        foreach ($uow->getScheduledEntityDeletions() as $entity) {
            $this->gatherResourceAndItemTags($entity, true);
            $this->gatherRelationTags($em, $entity);
        }
    }
public function onFlush(OnFlushEventArgs $eventArgs): void
    {
        $em = $eventArgs->getEntityManager();
        $uow = $em->getUnitOfWork();

        foreach ($uow->getScheduledEntityInsertions() as $entity) {
            $this->gatherResourceAndItemTags($entity, false);
            $this->gatherRelationTags($em, $entity);
        }

        foreach ($uow->getScheduledEntityUpdates() as $entity) {
            $this->gatherResourceAndItemTags($entity, true);
            $this->gatherRelationTags($em, $entity);
        }

        foreach ($uow->getScheduledEntityDeletions() as $entity) {
            $this->gatherResourceAndItemTags($entity, true);
            $this->gatherRelationTags($em, $entity);
        }
    }
public function onFlush ( OnFlushEventArgs $ eventArgs ) : void { $ em = $ eventArgs -> getEntityManager ( ) ; $ uow = $ em -> getUnitOfWork ( ) ; foreach ( $ uow -> getScheduledEntityInsertions ( ) as $ entity ) { $ this -> gatherResourceAndItemTags ( $ entity , false ) ; $ this -> gatherRelationTags ( $ em , $ entity ) ; } foreach ( $ uow -> getScheduledEntityUpdates ( ) as $ entity ) { $ this -> gatherResourceAndItemTags ( $ entity , true ) ; $ this -> gatherRelationTags ( $ em , $ entity ) ; } foreach ( $ uow -> getScheduledEntityDeletions ( ) as $ entity ) { $ this -> gatherResourceAndItemTags ( $ entity , true ) ; $ this -> gatherRelationTags ( $ em , $ entity ) ; } }
Collects tags from inserted and deleted entities, including relations.
Collects tags from inserted and deleted entities including relations .