public function is_discussion_locked(discussion_entity $discussion) : bool {
        if ($discussion->is_locked()) {
            return true;
        }

        return $this->is_discussion_time_locked($discussion);
    }
public function is_discussion_locked(discussion_entity $discussion) : bool {
        if ($discussion->is_locked()) {
            return true;
        }

        return $this->is_discussion_time_locked($discussion);
    }
public function is_discussion_locked ( discussion_entity $ discussion ) : bool { if ( $ discussion -> is_locked ( ) ) { return true ; } return $ this -> is_discussion_time_locked ( $ discussion ) ; }
Is the discussion locked? - Takes into account both discussion settings AND forum's criteria

@param discussion_entity $discussion The discussion to check
@return bool
Is the discussion locked? - Takes into account both discussion settings AND forum s criteria