src/Sulu/Bundle/MediaBundle/Search/EventListener/PermissionListener.php
public function onPermissionUpdate(PermissionUpdateEvent $event)
    {
        if (Collection::class !== $event->getType()) {
            return;
        }

        foreach ($this->fileVersionMetaRepository->findByCollectionId($event->getIdentifier()) as $fileVersionMeta) {
            $this->searchManager->deindex($fileVersionMeta);
        }
    }
public function onPermissionUpdate(PermissionUpdateEvent $event)
    {
        if (Collection::class !== $event->getType()) {
            return;
        }

        foreach ($this->fileVersionMetaRepository->findByCollectionId($event->getIdentifier()) as $fileVersionMeta) {
            $this->searchManager->deindex($fileVersionMeta);
        }
    }
public function onPermissionUpdate ( PermissionUpdateEvent $ event ) { if ( Collection :: class !== $ event -> getType ( ) ) { return ; } foreach ( $ this -> fileVersionMetaRepository -> findByCollectionId ( $ event -> getIdentifier ( ) ) as $ fileVersionMeta ) { $ this -> searchManager -> deindex ( $ fileVersionMeta ) ; } }
Removes all FileVersionMetas belonging to the collection, which just got secured.

@param PermissionUpdateEvent $event
Removes all FileVersionMetas belonging to the collection which just got secured .