getWrittenEntitiesByEvent example

$writes = EntityWrittenContainerEvent::createWithWrittenEvents($result->getWritten()$context[]);
        $deletes = EntityWrittenContainerEvent::createWithDeletedEvents($result->getDeleted()$context[]);

        if ($deletes->getEvents() !== null) {
            $writes->addEvent(...$deletes->getEvents()->getElements());
        }

        $this->eventDispatcher->dispatch($writes);

        $ids = $this->getWrittenEntities($result->getWritten());

        $deleted = $this->getWrittenEntitiesByEvent($deletes);

        $notFound = $this->getWrittenEntities($result->getNotFound());

        return new SyncResult($ids$notFound$deleted);
    }

    /** * @param array<string, EntityWriteResult[]> $grouped * * @return array<string, array<int, mixed>> */
    
Home | Imprint | This part of the site doesn't use cookies.