EcommerceBundle/Controller/FeatureValueController.php
public function editAction($featureId, $id)
    {
        $em = $this->getDoctrine()->getManager();

        /** @var Feature $feature */
        $feature = $em->getRepository('EcommerceBundle:Feature')->find($featureId);

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

        /** @var FeatureValue $entity */
        $entity = $em->getRepository('EcommerceBundle:FeatureValue')->find($id);

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

        $editForm = $this->createForm(new FeatureValueType(), $entity);
        $deleteForm = $this->createDeleteForm($featureId, $id);

        return array(
            'entity'      => $entity,
            'feature'   => $feature,
            'edit_form'   => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        );
    }
public function editAction($featureId, $id)
    {
        $em = $this->getDoctrine()->getManager();

        /** @var Feature $feature */
        $feature = $em->getRepository('EcommerceBundle:Feature')->find($featureId);

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

        /** @var FeatureValue $entity */
        $entity = $em->getRepository('EcommerceBundle:FeatureValue')->find($id);

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

        $editForm = $this->createForm(new FeatureValueType(), $entity);
        $deleteForm = $this->createDeleteForm($featureId, $id);

        return array(
            'entity'      => $entity,
            'feature'   => $feature,
            'edit_form'   => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        );
    }
public function editAction ( $ featureId , $ id ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; /** @var Feature $feature */ $ feature = $ em -> getRepository ( 'EcommerceBundle:Feature' ) -> find ( $ featureId ) ; if ( ! $ feature ) { throw $ this -> createNotFoundException ( 'Unable to find Feature entity.' ) ; } /** @var FeatureValue $entity */ $ entity = $ em -> getRepository ( 'EcommerceBundle:FeatureValue' ) -> find ( $ id ) ; if ( ! $ entity ) { throw $ this -> createNotFoundException ( 'Unable to find FeatureValue entity.' ) ; } $ editForm = $ this -> createForm ( new FeatureValueType ( ) , $ entity ) ; $ deleteForm = $ this -> createDeleteForm ( $ featureId , $ id ) ; return array ( 'entity' => $ entity , 'feature' => $ feature , 'edit_form' => $ editForm -> createView ( ) , 'delete_form' => $ deleteForm -> createView ( ) , ) ; }
Displays a form to edit an existing FeatureValue entity.

@param int $featureId The feature id
@param int $id        The entity id

@throws NotFoundHttpException
@return array

@Route("/{id}/edit")
@Method("GET")
@Template()
Displays a form to edit an existing FeatureValue entity .