SalesChannelEntitySearchResultLoadedEvent example



            $element->addExtension('search', new ArrayEntity($data));
        }

        $result = new EntitySearchResult($this->definition->getEntityName()$ids->getTotal()$entities$aggregations$criteria$salesChannelContext->getContext());
        $result->addState(...$ids->getStates());

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

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

        return $result;
    }

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

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

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