private function listBasketContent(Request $request, Basket $basket)
    {
        return array_map(function (BasketElement $element) use ($request) {
            return $this->listBasketElement($request, $element);
        }, iterator_to_array($basket->getElements()));
    }