BlogBundle/Controller/BlogController.php
private function createCommentForm(CommentFront $model, $entity)
    {
        $form = $this->createForm('BlogBundle\Form\CommentFrontType', $model, array(
            'action' => $this->generateUrl('blog_blog_comment', array('post' => $entity->getId())),
            'method' => 'POST',
            'attr' => array('id' => 'comment-form','class' => 'comment-form')
        ));

        return $form;
    }
private function createCommentForm(CommentFront $model, $entity)
    {
        $form = $this->createForm('BlogBundle\Form\CommentFrontType', $model, array(
            'action' => $this->generateUrl('blog_blog_comment', array('post' => $entity->getId())),
            'method' => 'POST',
            'attr' => array('id' => 'comment-form','class' => 'comment-form')
        ));

        return $form;
    }
Creates a form to create a Post entity.

@param Post $entity The entity

@return \Symfony\Component\Form\Form The form