Exemplo n.º 1
0
 /**
  * Deletes all comments of the given post
  *
  * @param Tx_BlogExample_Domain_Model_Post $post The post the comment is related to
  * @return void
  */
 public function deleteAllAction(Tx_BlogExample_Domain_Model_Post $post)
 {
     // TODO access protection
     $post->removeAllComments();
     $this->addFlashMessage('deletedAll', t3lib_FlashMessage::INFO);
     $this->redirect('edit', 'Post', NULL, array('post' => $post, 'blog' => $post->getBlog()));
 }
Exemplo n.º 2
0
 /**
  * Finds all remaining posts of the blog
  *
  * @param Tx_BlogExample_Domain_Model_Post $post The reference post
  * @return Tx_Extbase_Persistence_QueryResultInterface The posts
  */
 public function findRemaining(Tx_BlogExample_Domain_Model_Post $post)
 {
     $blog = $post->getBlog();
     $query = $this->createQuery();
     return $query->matching($query->logicalAnd($query->equals('blog', $blog), $query->logicalNot($query->equals('uid', $post->getUid()))))->execute();
 }