public function createAction(Request $request, $id)
    {
        //get the business entity
        $businessEntity = $this->getBusinessEntity($id);

        /** @var BusinessTemplate $view */
        $view = $this->get('victoire_business_page.BusinessTemplate_chain')->getBusinessTemplate($id);
        $view->setBusinessEntityId($businessEntity->getId());

        $form = $this->createCreateForm($view);

        $form->handleRequest($request);

        $params = [
            'success' => false,
        ];

        if ($form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($view);
            $em->flush();

            //redirect to the page of the pagePattern
            $params['url'] = $this->generateUrl('victoire_business_template_show', ['id' => $view->getId()]);
            $params['success'] = true;

            $this->congrat($this->get('translator')->trans('victoire.business_template.create.success', [], 'victoire'));
        } else {
            //get the errors as a string
            $params['message'] = $this->container->get('victoire_form.error_helper')->getRecursiveReadableErrors($form);
        }

        return new JsonResponse($params);
    }