public function createAction(Request $request, AbstractAdmin $admin)
    {
        $translator = $this->getTranslator();

        // prepare entity
        $entityClass = $admin->getEntityClass();
        $entity = new $entityClass();

        $this->secure($admin, ContentVoter::CREATE_CONTENT, $entity);

        $form = $this->getCreateForm($admin, $entity);

        $form->handleRequest($request);
        if ($form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $admin->prePersist($entity);
            $em->persist($entity);
            $admin->postPersist($entity);
            $em->flush();

            $this->get('session')->getFlashBag()->add('success', $translator->trans('crud.create.success', [], 'ShuweeAdminBundle'));

            return $this->redirect($this->getAdminRoutingHelper()->generateUrl($admin, 'index'));
        }

        $admin->preCreateFormRender($form);

        return $this->render(
            'ShuweeAdminBundle:Content:create.html.twig',
            [
                'admin' => $admin,
                'form' => $form->createView(),
            ]
        );
    }