/** * Format an alert into it's output string to be used in both the main alerts listing page and the popup. * * @param MybbStuff_MyAlerts_Entity_Alert $alert The alert to format. * @return string The formatted alert string. */ public function formatAlert(MybbStuff_MyAlerts_Entity_Alert $alert, array $outputAlert) { global $lang; $from_user = get_user($alert->getFromUserId()); $this->buildShowLink($alert); return $lang->sprintf($lang->myprofile_alert, format_name(htmlspecialchars_uni($from_user["username"]), $from_user["usergroup"], $from_user["displaygroup"])); }
/** * Build a link to an alert's content so that the system can redirect to it. * * @param MybbStuff_MyAlerts_Entity_Alert $alert The alert to build the link for. * * @return string The built alert, preferably an absolute link. */ public function buildShowLink(MybbStuff_MyAlerts_Entity_Alert $alert) { return get_profile_link($alert->getFromUserId()); }