public function newAction($postid)
    {
        $post = $this->getPost($postid);

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

        return array(
            'entity' => $entity,
            'post'   => $post,
            'form'   => $form->createView(),
        );
    }
public function newAction($postid)
    {
        $post = $this->getPost($postid);

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

        return array(
            'entity' => $entity,
            'post'   => $post,
            'form'   => $form->createView(),
        );
    }
public function newAction ( $ postid ) { $ post = $ this -> getPost ( $ postid ) ; $ entity = new Comment ( ) ; $ form = $ this -> createForm ( new CommentType ( ) , $ entity ) ; return array ( 'entity' => $ entity , 'post' => $ post , 'form' => $ form -> createView ( ) , ) ; }
Displays a form to create a new Comment entity.

@Route("/new", name="post_comment_new")
@Secure("ROLE_COMMENT_WRITE")
@Template()
Displays a form to create a new Comment entity .