예제 #1
0
파일: User.php 프로젝트: nebuchar/ddd-blog
 public function removePost(Post $post)
 {
     if (!$this->hasPost($post)) {
         throw new DomainException('Post is not exists');
     }
     $this->posts->removeElement($post);
 }
예제 #2
0
 /**
  * @param Post $post
  */
 public function removePost(Post $post)
 {
     $this->posts->removeElement($post);
 }
예제 #3
0
 /**
  * Remove comments
  *
  * @param \Workshop\Bundle\BackendBundle\Entity\Comment $comments
  */
 public function removeComment(\Workshop\Bundle\BackendBundle\Entity\Comment $comments)
 {
     $this->comments->removeElement($comments);
 }
예제 #4
0
 /**
  * Remove posts
  *
  * @param \Workshop\Bundle\BackendBundle\Entity\Post $posts
  */
 public function removePost(\Workshop\Bundle\BackendBundle\Entity\Post $posts)
 {
     $this->posts->removeElement($posts);
 }