Flarum\Core\Discussion::hide PHP Method

hide() public method

Hide the discussion.
public hide ( User $actor = null )
$actor User
    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;
    }