public function hide(User $actor = null) { if (!$this->hide_time) { $this->hide_time = time(); $this->hide_user_id = $actor ? $actor->id : null; $this->raise(new DiscussionWasHidden($this)); } return $this; }