public function editAction(Image $image, Request $request)
    {
        $form = $this->container->get('form.factory')->createNamed(
            'image',
            ImageType::class,
            $image,
            array(
                'action' => $this->container->get('router')->generate(
                    'synapse_admin_image_edition',
                    array('id' => $image->getId())
                ),
                'method' => 'POST',
                'csrf_protection' => false,
            )
        );
        if ($request->request->has('image')) {
            $form->handleRequest($request);
            if ($form->isValid()) {
                return $this->redirect(
                    $this->container->get('router')->generate(
                        'synapse_admin_image_edition',
                        array('id' => $image->getId())
                    )
                );
            }
        }

        return $this->render('SynapseAdminBundle:Image:edit.html.twig', array(
            'image' => $image,
            'theme' => $request->attributes->get(
                'synapse_theme',
                $this->container->get('synapse')
                    ->enableDefaultTheme()
                    ->getCurrentTheme()
            ),
            'form' => $form->createView(),
        ));
    }