EntitySearchedEvent example

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

        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 */
Home | Imprint | This part of the site doesn't use cookies.