code: 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(),
          );
      }
docs: Displays a form to edit an existing Group entity.
  
  @Route("/{id}/edit", name="orkestra_group_edit")
  @Template()
  @Secure(roles="ROLE_GROUP_WRITE")