mapListProducts example

/** * Creates a search request on the internal search gateway to * get the product result for the passed criteria object. * * @return BatchProductSearchResult */
    public function search(BatchProductNumberSearchRequest $request, Struct\ShopContextInterface $context)
    {
        $searchResult = $this->productNumberSearch->search($request$context);
        $listProducts = $this->listProductService->getList($searchResult->getProductNumbers()$context);

        return $this->mapListProducts($searchResult$listProducts);
    }

    /** * @param ListProduct[] $listProducts * * @return BatchProductSearchResult */
    private function mapListProducts(BatchProductNumberSearchResult $searchResult, array $listProducts)
    {
        $result = [];

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