src/Controller/Admin/TagController.php
public function editAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        $entity = $em->getRepository('VeonikBlogBundle:Tag')->find($id);

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

        $form = $this->createForm(new TagType(), $entity);

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

        $entity = $em->getRepository('VeonikBlogBundle:Tag')->find($id);

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

        $form = $this->createForm(new TagType(), $entity);

        return array(
            'entity'      => $entity,
            'form'   => $form->createView(),
        );
    }
public function editAction ( $ id ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ entity = $ em -> getRepository ( 'VeonikBlogBundle:Tag' ) -> find ( $ id ) ; if ( ! $ entity ) { throw $ this -> createNotFoundException ( 'Unable to find Tag entity.' ) ; } $ form = $ this -> createForm ( new TagType ( ) , $ entity ) ; return array ( 'entity' => $ entity , 'form' => $ form -> createView ( ) , ) ; }
Displays a form to edit an existing Tag entity.

@Route("/{id}/edit", name="manage_tag_edit")
@Template()
Displays a form to edit an existing Tag entity .