public function editBlockAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        $entity = $em->getRepository('AmulenPageBundle:Block')->find($id);
        $availableEntityLangs = $em->getRepository('AmulenPageBundle:Block')->findBy(array('page' => $entity->getPage(), 'name' => $entity->getName()));

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find Block entity.');
        }

        $editForm = $this->createBlockEditForm($entity);
        $deleteForm = $this->createBlockDeleteForm($id);

        return array(
            'entity' => $entity,
            'availableEntityLangs' => $availableEntityLangs,
            'edit_form' => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        );
    }