Exemplo n.º 1
0
 /**
  * Adds a comment to a blog post and redirects to single view
  *
  * @param Tx_BlogExample_Domain_Model_Post $post The post the comment is related to
  * @param Tx_BlogExample_Domain_Model_Comment $newComment The comment to create
  * @return void
  */
 public function createAction(Tx_BlogExample_Domain_Model_Post $post, Tx_BlogExample_Domain_Model_Comment $newComment)
 {
     $post->addComment($newComment);
     $this->addFlashMessage('created');
     $this->redirect('show', 'Post', NULL, array('post' => $post));
 }