src/Controller/Opinion/OpinionController.php
/**
     * This method is called via a Twig render() function in reduction/view.html.twig.
     * Ajax is used to submit this one.
     */
This method is called via a Twig render() function in reduction/view.html.twig.
Ajax is used to submit this one.
This method is called via a Twig render () function in reduction / view . html . twig . Ajax is used to submit this one .
public function commentForm(Reduction $reduction): Response
    {
        $form = $this->createForm(
            OpinionType::class,
            null,
            ['action' => $this->generateUrl('app_opinion_comment', ['slug' => $reduction->getSlug()])]
        );
        return $this->render('opinion/_comment_form.html.twig', [
            'form' => $form->createView(),
        ]);
    }
public function commentForm ( Reduction $ reduction ) : Response { $ form = $ this -> createForm ( OpinionType :: class , null , [ 'action' => $ this -> generateUrl ( 'app_opinion_comment' , [ 'slug' => $ reduction -> getSlug ( ) ] ) ] ) ; return $ this -> render ( 'opinion/_comment_form.html.twig' , [ 'form' => $ form -> createView ( ) , ] ) ; }
This method is called via a Twig render() function in reduction/view.html.twig.
This method is called via a Twig render () function in reduction / view . html . twig .