public function can_reply_privately_to_post(stdClass $user, post_entity $post) : bool {
        if ($post->is_private_reply()) {
            // You cannot reply privately to a post which is, itself, a private reply.
            return false;
        }

        return has_capability('mod/forum:postprivatereply', $this->get_context(), $user);
    }
public function can_reply_privately_to_post(stdClass $user, post_entity $post) : bool {
        if ($post->is_private_reply()) {
            // You cannot reply privately to a post which is, itself, a private reply.
            return false;
        }

        return has_capability('mod/forum:postprivatereply', $this->get_context(), $user);
    }
public function can_reply_privately_to_post ( stdClass $ user , post_entity $ post ) : bool { if ( $ post -> is_private_reply ( ) ) { // You cannot reply privately to a post which is, itself, a private reply. return false ; } return has_capability ( 'mod/forum:postprivatereply' , $ this -> get_context ( ) , $ user ) ; }
Can the user reply privately to the specified post?

@param stdClass $user The user to check
@param post_entity $post The post the user wants to reply to
@return bool
Can the user reply privately to the specified post?