src/Flowcode/PageBundle/Controller/AdminPageController.php
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(),
        );
    }
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(),
        );
    }
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 ( ) , ) ; }
Displays a form to edit an existing Block entity.

@Route("/block/{id}/edit", name="admin_page_block_edit")
@Method("GET")
@Template("FlowcodePageBundle:AdminPage:edit_block.html.twig")
Displays a form to edit an existing Block entity .