public function editAction(Request $request, $id)
    {
        $acl = $this->get('bacon_acl.service.authorization');

        if (!$acl->authorize('module-actions', 'EDIT')) {
            throw $this->createAccessDeniedException();
        }

        $formTypeName       =   $this->getParameter('bacon_acl.forms.module_actions_form_type_class');
        $formHandlerName    =   $this->getParameter('bacon_acl.forms.module_actions_form_handler_class');

        $entity = $this->getRepository()->find($id);

        if (!$entity) {
            return $this->createNotFoundException('Entity not Exists!');
        }

        $breadcumbs = $this->container->get('bacon_breadcrumbs');

        $breadcumbs->addItem([
            'title' => 'ModuleActions',
            'route' => 'module_actions',
        ]);

        $breadcumbs->addItem([
            'title' => 'Edit',
            'route' => '',
        ]);

        $form = $this->createForm($formTypeName, $entity);
        $deleteForm = $this->createDeleteForm('module_actions_delete', $entity);
        $form->handleRequest($request);

        if ($form->isSubmitted()) {
            $handler = new $formHandlerName(
                $form,
                $this->getDoctrine()->getManager(),
                $this->get('session')->getFlashBag()
            );

            if ($entity = $handler->save()) {
                return $this->redirect($this->generateUrl('module_actions'));
            }
        }

        return [
            'entity'      => $entity,
            'form'        => $form->createView(),
            'delete_form' => $deleteForm->createView(),
        ];
    }