Controller/GroupController.php
public function editAction($id)
    {
        $em = $this->getDoctrine()->getEntityManager();

        $group = $em->getRepository('Orkestra\Bundle\ApplicationBundle\Entity\Group')->find($id);

        if (!$group) {
            throw $this->createNotFoundException('Unable to locate Group');
        }

        $form = $this->createForm(GroupType::class, $group);

        return array(
            'group' => $group,
            'form' => $form->createView(),
        );
    }
public function editAction($id)
    {
        $em = $this->getDoctrine()->getEntityManager();

        $group = $em->getRepository('Orkestra\Bundle\ApplicationBundle\Entity\Group')->find($id);

        if (!$group) {
            throw $this->createNotFoundException('Unable to locate Group');
        }

        $form = $this->createForm(GroupType::class, $group);

        return array(
            'group' => $group,
            'form' => $form->createView(),
        );
    }
Displays a form to edit an existing Group entity.

@Route("/{id}/edit", name="orkestra_group_edit")
@Template()
@Secure(roles="ROLE_GROUP_WRITE")