EntityAggregationResultLoadedEvent example

return $result;
    }

    public function aggregate(Criteria $criteria, SalesChannelContext $salesChannelContext): AggregationResultCollection
    {
        $criteria = clone $criteria;

        $this->processCriteria($criteria$salesChannelContext);

        $result = $this->aggregator->aggregate($this->definition, $criteria$salesChannelContext->getContext());

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

        return $result;
    }

    public function searchIds(Criteria $criteria, SalesChannelContext $salesChannelContext): IdSearchResult
    {
        $criteria = clone $criteria;

        $this->processCriteria($criteria$salesChannelContext);

        


        return Profiler::trace($criteria->getTitle()fn () => $this->_search($criteria$context), 'repository');
    }

    public function aggregate(Criteria $criteria, Context $context): AggregationResultCollection
    {
        $criteria = clone $criteria;

        $result = $this->aggregator->aggregate($this->definition, $criteria$context);

        $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));

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