public function disableGlobalNotifications(Forum $forum) { $this->om->startFlushSuite(); $forum->setActivateNotifications(false); $this->om->persist($forum); $notifications = $this->forumRepo->findNonSelfNotificationsByForum($forum); foreach ($notifications as $notification) { $this->removeNotification($forum, $notification); } $this->om->endFlushSuite(); }