src/Controller/Framework/LsDefAssociationGroupingController.php
/**
     * Displays a form to edit an existing LsDefAssociationGrouping entity.
     *
     * @Route("/{id}/edit", methods={"GET", "POST"}, name="lsdef_association_grouping_edit")
     * @Template()
     * @Security("is_granted('create', 'lsdoc')")
     *
     * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
     */
Displays a form to edit an existing LsDefAssociationGrouping entity.


Displays a form to edit an existing LsDefAssociationGrouping entity .
public function editAction(Request $request, LsDefAssociationGrouping $associationGrouping)
    {
        $deleteForm = $this->createDeleteForm($associationGrouping);
        $editForm = $this->createForm(LsDefAssociationGroupingType::class, $associationGrouping);
        $editForm->handleRequest($request);
        if ($editForm->isSubmitted() && $editForm->isValid()) {
            try {
                $command = new UpdateAssociationGroupCommand($associationGrouping);
                $this->sendCommand($command);
                return $this->redirectToRoute('lsdef_association_grouping_edit', array('id' => $associationGrouping->getId()));
            } catch (\Exception $e) {
                $editForm->addError(new FormError('Error updating association group: '.$e->getMessage()));
            }
        }
        return [
            'lsDefAssociationGrouping' => $associationGrouping,
            'edit_form' => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        ];
    }
public function editAction ( Request $ request , LsDefAssociationGrouping $ associationGrouping ) { $ deleteForm = $ this -> createDeleteForm ( $ associationGrouping ) ; $ editForm = $ this -> createForm ( LsDefAssociationGroupingType :: class , $ associationGrouping ) ; $ editForm -> handleRequest ( $ request ) ; if ( $ editForm -> isSubmitted ( ) && $ editForm -> isValid ( ) ) { try { $ command = new UpdateAssociationGroupCommand ( $ associationGrouping ) ; $ this -> sendCommand ( $ command ) ; return $ this -> redirectToRoute ( 'lsdef_association_grouping_edit' , array ( 'id' => $ associationGrouping -> getId ( ) ) ) ; } catch ( \ Exception $ e ) { $ editForm -> addError ( new FormError ( 'Error updating association group: ' . $ e -> getMessage ( ) ) ) ; } } return [ 'lsDefAssociationGrouping' => $ associationGrouping , 'edit_form' => $ editForm -> createView ( ) , 'delete_form' => $ deleteForm -> createView ( ) , ] ; }
Displays a form to edit an existing LsDefAssociationGrouping entity.
Displays a form to edit an existing LsDefAssociationGrouping entity .