EntityIdSearchResultLoadedEvent example

return $result;
    }

    public function searchIds(Criteria $criteria, Context $context): IdSearchResult
    {
        $criteria = clone $criteria;

        $this->eventDispatcher->dispatch(new EntitySearchedEvent($criteria$this->definition, $context));

        $result = $this->searcher->search($this->definition, $criteria$context);

        $event = new EntityIdSearchResultLoadedEvent($this->definition, $result);
        $this->eventDispatcher->dispatch($event$event->getName());

        return $result;
    }

    /** * @param array<array<string, mixed|null>> $data */
    public function update(array $data, Context $context): EntityWrittenContainerEvent
    {
        ReplicaConnection::ensurePrimary();

        
Home | Imprint | This part of the site doesn't use cookies.