/** * Creates a new post * * @param Tx_BlogExample_Domain_Model_Blog $blog The blog the post belogns to * @param Tx_BlogExample_Domain_Model_Post $newBlog A fresh Blog object which has not yet been added to the repository * @return void */ public function createAction(Tx_BlogExample_Domain_Model_Blog $blog, Tx_BlogExample_Domain_Model_Post $newPost) { // TODO access protection $blog->addPost($newPost); $newPost->setBlog($blog); $this->addFlashMessage('created'); $this->redirect('index', NULL, NULL, array('blog' => $blog)); }