public function defineAddBasketForm(ProductInterface $product, FormBuilder $formBuilder, $showQuantity = true, array $options = [])
    {
        $basketElement = $this->createBasketElement($product);

        // create the product form
        $formBuilder
            ->setData($basketElement)
            ->add('productId', 'hidden');

        if ($showQuantity) {
            $formBuilder->add('quantity', 'integer');
        } else {
            $transformer = new QuantityTransformer();
            $formBuilder->add(
                    $formBuilder->create('quantity', 'hidden', ['data' => 1])
                                ->addModelTransformer($transformer)
            );
        }
    }