Inheritance: extends Symfony\Component\EventDispatcher\Event
Exemplo n.º 1
0
 public function onPermissionUpdate(PermissionUpdateEvent $permissionUpdateEvent)
 {
     if ($permissionUpdateEvent->getType() !== SecurityBehavior::class) {
         return;
     }
     $document = $this->documentManager->find($permissionUpdateEvent->getIdentifier());
     $this->searchManager->deindex($document);
 }
Exemplo n.º 2
0
 /**
  * Removes all FileVersionMetas belonging to the collection, which just got secured.
  *
  * @param PermissionUpdateEvent $event
  */
 public function onPermissionUpdate(PermissionUpdateEvent $event)
 {
     if ($event->getType() !== Collection::class) {
         return;
     }
     foreach ($this->fileVersionMetaRepository->findByCollectionId($event->getIdentifier()) as $fileVersionMeta) {
         $this->searchManager->deindex($fileVersionMeta);
     }
 }