phpbb\notification\type\post::get_title PHP Method

get_title() public method

Get the HTML formatted title of this notification
public get_title ( ) : string
return string
    public function get_title()
    {
        $responders = $this->get_data('responders');
        $usernames = array();
        if (!is_array($responders)) {
            $responders = array();
        }
        $responders = array_merge(array(array('poster_id' => $this->get_data('poster_id'), 'username' => $this->get_data('post_username'))), $responders);
        $responders_cnt = sizeof($responders);
        $responders = $this->trim_user_ary($responders);
        $trimmed_responders_cnt = $responders_cnt - sizeof($responders);
        foreach ($responders as $responder) {
            if ($responder['username']) {
                $usernames[] = $responder['username'];
            } else {
                $usernames[] = $this->user_loader->get_username($responder['poster_id'], 'no_profile');
            }
        }
        if ($trimmed_responders_cnt > 20) {
            $usernames[] = $this->user->lang('NOTIFICATION_MANY_OTHERS');
        } else {
            if ($trimmed_responders_cnt) {
                $usernames[] = $this->user->lang('NOTIFICATION_X_OTHERS', $trimmed_responders_cnt);
            }
        }
        return $this->user->lang($this->language_key, phpbb_generate_string_list($usernames, $this->user), $responders_cnt);
    }