NoFilterException example

/** @var ProductStreamEntity|null $stream */
        $stream = $this->repository
            ->search($criteria$context)
            ->get($id);

        if (!$stream) {
            throw new EntityNotFoundException('product_stream', $id);
        }

        $data = $stream->getApiFilter();
        if (!$data) {
            throw new NoFilterException($id);
        }

        $filters = [];
        $exception = new SearchRequestException();

        foreach ($data as $filter) {
            $filters[] = QueryStringParser::fromArray($this->productDefinition, $filter$exception, '');
        }

        return $filters;
    }
}
Home | Imprint | This part of the site doesn't use cookies.