本文整理匯總了PHP中Tracker_Artifact::getID方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tracker_Artifact::getID方法的具體用法?PHP Tracker_Artifact::getID怎麽用?PHP Tracker_Artifact::getID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tracker_Artifact
的用法示例。
在下文中一共展示了Tracker_Artifact::getID方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: sendReminder
/**
* Send a notification
*
* @param Array $recipients the list of recipients
* @param Array $headers the additional headers
* @param String $subject the subject of the message
* @param String $htmlBody the html content of the message
* @param String $txtBody the text content of the message
*
* @return Void
*/
protected function sendReminder(Tracker_Artifact $artifact, $recipients, $headers, $subject, $htmlBody, $txtBody)
{
$mail = new Codendi_Mail();
$hp = Codendi_HTMLPurifier::instance();
$breadcrumbs = array();
$groupId = $this->getTracker()->getGroupId();
$project = $this->getTracker()->getProject();
$trackerId = $this->getTracker()->getID();
$artifactId = $artifact->getID();
$breadcrumbs[] = '<a href="' . get_server_url() . '/projects/' . $project->getUnixName(true) . '" />' . $project->getPublicName() . '</a>';
$breadcrumbs[] = '<a href="' . get_server_url() . '/plugins/tracker/?tracker=' . (int) $trackerId . '" />' . $hp->purify(SimpleSanitizer::unsanitize($this->getTracker()->getName())) . '</a>';
$breadcrumbs[] = '<a href="' . get_server_url() . '/plugins/tracker/?aid=' . (int) $artifactId . '" />' . $hp->purify($this->getTracker()->getName() . ' #' . $artifactId) . '</a>';
$mail->getLookAndFeelTemplate()->set('breadcrumbs', $breadcrumbs);
$mail->getLookAndFeelTemplate()->set('title', $hp->purify($subject));
$mail->setFrom($GLOBALS['sys_noreply']);
$mail->addAdditionalHeader("X-Codendi-Project", $this->getTracker()->getProject()->getUnixName());
$mail->addAdditionalHeader("X-Codendi-Tracker", $this->getTracker()->getItemName());
$mail->addAdditionalHeader("X-Codendi-Artifact-ID", $artifact->getId());
foreach ($headers as $header) {
$mail->addAdditionalHeader($header['name'], $header['value']);
}
$mail->setTo(implode(', ', $recipients));
$mail->setSubject($subject);
if ($htmlBody) {
$mail->setBodyHTML($htmlBody);
}
$mail->setBodyText($txtBody);
$mail->send();
}
示例2: sendReminder
/**
* Send a notification
*
* @param Array $recipients the list of recipients
* @param Array $headers the additional headers
* @param String $subject the subject of the message
* @param String $htmlBody the html content of the message
* @param String $txtBody the text content of the message
*
* @return Void
*/
protected function sendReminder(Tracker_Artifact $artifact, $recipients, $headers, $subject, $htmlBody, $txtBody)
{
$hp = Codendi_HTMLPurifier::instance();
$breadcrumbs = array();
$project = $this->getTracker()->getProject();
$trackerId = $this->getTracker()->getID();
$artifactId = $artifact->getID();
$mail_enhancer = new MailEnhancer();
$breadcrumbs[] = '<a href="' . get_server_url() . '/projects/' . $project->getUnixName(true) . '" />' . $project->getPublicName() . '</a>';
$breadcrumbs[] = '<a href="' . get_server_url() . '/plugins/tracker/?tracker=' . (int) $trackerId . '" />' . $hp->purify($this->getTracker()->getName()) . '</a>';
$breadcrumbs[] = '<a href="' . get_server_url() . '/plugins/tracker/?aid=' . (int) $artifactId . '" />' . $hp->purify($this->getTracker()->getName() . ' #' . $artifactId) . '</a>';
$mail_enhancer->addPropertiesToLookAndFeel('breadcrumbs', $breadcrumbs);
$mail_enhancer->addPropertiesToLookAndFeel('title', $hp->purify($subject));
$mail_enhancer->addHeader("X-Codendi-Project", $this->getTracker()->getProject()->getUnixName());
$mail_enhancer->addHeader("X-Codendi-Tracker", $this->getTracker()->getItemName());
$mail_enhancer->addHeader("X-Codendi-Artifact-ID", $artifact->getId());
foreach ($headers as $header) {
$mail_enhancer->addHeader($header['name'], $header['value']);
}
$mail_notification_builder = new MailNotificationBuilder(new MailBuilder(TemplateRendererFactory::build()));
$mail_notification_builder->buildAndSendEmail($project, $recipients, $subject, $htmlBody, $txtBody, get_server_url() . $artifact->getUri(), trackerPlugin::TRUNCATED_SERVICE_NAME, $mail_enhancer);
}
示例3: fetchTooltipValue
/**
* Fetch the html code to display the field value in tooltip
*
* @param Tracker_Artifact $artifact
* @param Tracker_Artifact_ChangesetValue_Integer $value The changeset value of this field
* @return string The html code to display the field value in tooltip
*/
protected function fetchTooltipValue(Tracker_Artifact $artifact, Tracker_Artifact_ChangesetValue $value = null)
{
return $this->getArtifactRank($artifact->getID());
}