本文整理汇总了PHP中Tracker_Artifact_Changeset::getEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker_Artifact_Changeset::getEmail方法的具体用法?PHP Tracker_Artifact_Changeset::getEmail怎么用?PHP Tracker_Artifact_Changeset::getEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker_Artifact_Changeset
的用法示例。
在下文中一共展示了Tracker_Artifact_Changeset::getEmail方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exportFullHistory
public function exportFullHistory(SimpleXMLElement $artifact_xml, Tracker_Artifact_Changeset $changeset)
{
$changeset_xml = $artifact_xml->addChild('changeset');
if ($changeset->getSubmittedBy()) {
$this->user_xml_exporter->exportUserByUserId($changeset->getSubmittedBy(), $changeset_xml, 'submitted_by');
} elseif ($changeset->getEmail()) {
$this->user_xml_exporter->exportUserByMail($changeset->getEmail(), $changeset_xml, 'submitted_by');
}
$submitted_on = $changeset_xml->addChild('submitted_on', date('c', $changeset->getSubmittedOn()));
$submitted_on->addAttribute('format', 'ISO8601');
$comments_node = $changeset_xml->addChild('comments');
if ($changeset->getComment()) {
$changeset->getComment()->exportToXML($comments_node);
}
$this->values_exporter->exportChangedFields($artifact_xml, $changeset_xml, $changeset->getArtifact(), $changeset->getValues());
}
示例2: fetchFormattedMailUserInfo
private function fetchFormattedMailUserInfo(PFUser $user)
{
$hp = Codendi_HTMLPurifier::instance();
if ($user && !$user->isAnonymous()) {
$user_info = '<a href="mailto:' . $hp->purify($user->getEmail()) . '">' . $hp->purify($user->getRealName()) . ' (' . $hp->purify($user->getUserName()) . ')
</a>';
} else {
$user = UserManager::instance()->getUserAnonymous();
$user->setEmail($this->changeset->getEmail());
$user_info = $GLOBALS['Language']->getText('tracker_include_artifact', 'anon_user');
}
return $user_info;
}
示例3: getFullRESTValueForAnonymous
public function getFullRESTValueForAnonymous(Tracker_Artifact_Changeset $changeset)
{
$user = new PFUser();
$user->setEmail($changeset->getEmail());
$user->setRealName($changeset->getEmail());
$class_user_representation = '\\Tuleap\\User\\REST\\UserRepresentation';
$user_representation = new $class_user_representation();
$user_representation->build($user);
return $user_representation;
}
示例4: format
public function format(Tracker_Artifact_Changeset $changeset)
{
return array('id' => $changeset->getId(), 'submitted_by' => $changeset->getSubmittedBy(), 'submitted_on' => date('c', $changeset->getSubmittedOn()), 'email' => $changeset->getEmail(), 'html' => $this->getChangeContentForJson($changeset));
}
示例5: fetchFollowUp
/**
* Returns the HTML code of this comment
*
* @param String $format Format of the output
* @param Boolean $forMail If the output is intended for mail notification then value should be true
* @param Boolean $ignoreEmptyBody If true then display the user and the time even if the body is empty
*
* @return string the HTML code of this comment
*/
public function fetchFollowUp($format = 'html', $forMail = false, $ignoreEmptyBody = false)
{
if ($ignoreEmptyBody || !empty($this->body)) {
$uh = UserHelper::instance();
$hp = Codendi_HTMLPurifier::instance();
switch ($format) {
case 'html':
$html = '';
if ($forMail) {
$html .= '<div class="tracker_artifact_followup_title">';
$html .= '<span class="tracker_artifact_followup_title_user">';
$user = UserManager::instance()->getUserById($this->submitted_by);
if ($user && !$user->isAnonymous()) {
$html .= '<a href="mailto:' . $hp->purify($user->getEmail()) . '">' . $hp->purify($user->getRealName()) . ' (' . $hp->purify($user->getUserName()) . ')</a>';
} else {
$user = UserManager::instance()->getUserAnonymous();
$user->setEmail($this->changeset->getEmail());
$html .= $GLOBALS['Language']->getText('tracker_include_artifact', 'anon_user');
}
$html .= '</span></div>';
$timezone = '';
if ($user->getId() != 0) {
$timezone = ' (' . $user->getTimezone() . ')';
}
$html .= '<div class="tracker_artifact_followup_date">' . format_date($GLOBALS['Language']->getText('system', 'datefmt'), $this->submitted_on) . $timezone . '</div>';
$html .= '</div>';
if (Config::get('sys_enable_avatars')) {
$html .= '<div class="tracker_artifact_followup_avatar">';
$html .= $user->fetchHtmlAvatar();
$html .= '</div>';
}
$html .= '<div class="tracker_artifact_followup_content">';
$html .= '<div class="tracker_artifact_followup_comment">';
} else {
$html .= '<div class="tracker_artifact_followup_comment_edited_by">';
if ($this->parent_id) {
$html .= $GLOBALS['Language']->getText('plugin_tracker_include_artifact', 'last_edited');
$html .= ' ' . $uh->getLinkOnUserFromUserId($this->submitted_by) . ' ';
$html .= DateHelper::timeAgoInWords($this->submitted_on, false, true);
}
$html .= '</div>';
}
if (!$forMail || !empty($this->body)) {
$html .= '<input type="hidden" id="tracker_artifact_followup_comment_body_format_' . $this->changeset->getId() . '" name="tracker_artifact_followup_comment_body_format_' . $this->changeset->getId() . '" value="' . $this->bodyFormat . '" >';
$html .= '<div class="tracker_artifact_followup_comment_body">';
if ($this->parent_id && !trim($this->body)) {
$html .= '<em>' . $GLOBALS['Language']->getText('plugin_tracker_include_artifact', 'comment_cleared') . '</em>';
} else {
$html .= $this->getPurifiedBodyForHTML();
}
$html .= '</div>';
}
if ($forMail) {
$html .= '</div>';
}
return $html;
break;
default:
$output = '';
//if ($this->parent_id) {
//$output .= $GLOBALS['Language']->getText('plugin_tracker_include_artifact', 'last_edited');
//$output .= ' '.$uh->getDisplayNameFromUserId($this->submitted_by);
//$output .= ' '.DateHelper::timeAgoInWords($this->submitted_on).PHP_EOL;
//}
if (!empty($this->body)) {
$body = $this->getPurifiedBodyForText();
$output .= PHP_EOL . PHP_EOL . $body . PHP_EOL . PHP_EOL;
}
return $output;
break;
}
} else {
return null;
}
}
示例6: getFullRESTValueForAnonymous
public function getFullRESTValueForAnonymous(Tracker_Artifact_Changeset $changeset)
{
return array('label' => $changeset->getEmail(), 'display_name' => $changeset->getEmail(), 'user_url' => null, 'avatar_url' => null);
}
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:4,代码来源:Tracker_FormElement_Field_List_Bind_UsersValue.class.php