本文整理匯總了PHP中Tracker_Artifact::fetchMailTitle方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tracker_Artifact::fetchMailTitle方法的具體用法?PHP Tracker_Artifact::fetchMailTitle怎麽用?PHP Tracker_Artifact::fetchMailTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tracker_Artifact
的用法示例。
在下文中一共展示了Tracker_Artifact::fetchMailTitle方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getBodyHtml
/**
* Get the html body for notification
*
* @param Tracker_DateReminder $reminder Reminder that will send notifications
* @param Tracker_Artifact $artifact
* @param String $recipient The recipient who will receive the notification
* @param BaseLanguage $language The language of the message
*
* @return String
*/
protected function getBodyHtml(Tracker_DateReminder $reminder, Tracker_Artifact $artifact, $recipient, BaseLanguage $language)
{
$format = Codendi_Mail_Interface::FORMAT_HTML;
$hp = Codendi_HTMLPurifier::instance();
$protocol = $GLOBALS['sys_force_ssl'] ? 'https' : 'http';
$link = $protocol . '://' . $GLOBALS['sys_default_domain'] . TRACKER_BASE_URL . '/?aid=' . $artifact->getId();
$output = '<h1>' . $hp->purify($artifact->fetchMailTitle($recipient, $format, false)) . '</h1>' . PHP_EOL;
$output .= $language->getText('plugin_tracker_date_reminder', 'body_header', array($hp->purify($GLOBALS['sys_name']), $hp->purify($reminder->getField()->getLabel()), $reminder->getFieldValue($artifact)));
$output .= '<br>';
$output .= $language->getText('plugin_tracker_date_reminder', 'body_art_html_link', array($link));
$output .= '<br>';
return $output;
}