当前位置: 首页>>代码示例>>PHP>>正文


PHP Tracker_Artifact_Changeset::getId方法代码示例

本文整理汇总了PHP中Tracker_Artifact_Changeset::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker_Artifact_Changeset::getId方法的具体用法?PHP Tracker_Artifact_Changeset::getId怎么用?PHP Tracker_Artifact_Changeset::getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tracker_Artifact_Changeset的用法示例。


在下文中一共展示了Tracker_Artifact_Changeset::getId方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fetchFollowUp

 /**
  * Returns the HTML code of this comment
  *
  * @return string the HTML code of this comment
  */
 public function fetchFollowUp()
 {
     if ($this->hasEmptyBody()) {
         return null;
     }
     $uh = UserHelper::instance();
     $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 (!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>';
     }
     return $html;
 }
开发者ID:pdaniel-frk,项目名称:tuleap,代码行数:33,代码来源:Tracker_Artifact_Changeset_Comment.class.php

示例2: getRawMailForChangeset

 private function getRawMailForChangeset(Tracker_Artifact_Changeset $changeset)
 {
     $raw_mails = $this->getCachedRawMailByChangesetsForArtifact($changeset->getArtifact());
     $changeset_id = $changeset->getId();
     if (isset($raw_mails[$changeset_id])) {
         return $raw_mails[$changeset_id];
     }
     return null;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:IncomingMailGoldenRetriever.php

示例3: addChangeset

 public function addChangeset(Tracker_Artifact_Changeset $changeset)
 {
     $this->changesets[$changeset->getId()] = $changeset;
 }
开发者ID:superlinger,项目名称:tuleap,代码行数:4,代码来源:Tracker_Artifact.class.php

示例4: linkRawMailToChangeset

 private function linkRawMailToChangeset($raw_mail, Tracker_Artifact_Changeset $changeset)
 {
     $this->incoming_mail_dao->save($changeset->getId(), $raw_mail);
 }
开发者ID:ndjido,项目名称:tuleap,代码行数:4,代码来源:MailGateway.class.php

示例5: 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));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:4,代码来源:Tracker_Artifact_ChangesetJsonFormatter.class.php

示例6: linkRawMailToChangeset

 private function linkRawMailToChangeset($raw_mail, Tracker_Artifact_Changeset $changeset)
 {
     $this->logger->debug('Linking created changeset (' . $changeset->getId() . ') to the raw mail.');
     $this->incoming_mail_dao->save($changeset->getId(), $raw_mail);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:5,代码来源:MailGateway.class.php

示例7: isFirstChangeset

 /**
  * say if the changeset is the first one for this artifact
  *
  * @return bool
  */
 public function isFirstChangeset(Tracker_Artifact_Changeset $changeset)
 {
     $c = $this->getFirstChangeset();
     return $c->getId() == $changeset->getId();
 }
开发者ID:nterray,项目名称:tuleap,代码行数:10,代码来源:Tracker_Artifact.class.php

示例8: getEmail

 private function getEmail(PFUser $user, Tracker_Artifact $artifact, Tracker_Artifact_Changeset $changeset)
 {
     return "<" . $artifact->getId() . "-" . $this->getHash($user, $artifact) . "-" . $user->getId() . "-" . $changeset->getId() . "@" . $this->host . ">";
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:4,代码来源:RecipientFactory.class.php

示例9: 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;
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:84,代码来源:Tracker_Artifact_Changeset_Comment.class.php

示例10: after

 /**
  * Execute actions after transition happens (if there is one)
  *
  * @param PFUser                     $user               The user who changed things
  * @param Array                      $fields_data        Request field data (array[field_id] => data)
  * @param Tracker_Artifact_Changeset $new_changeset      The changeset that has just been created
  * @param Tracker_Artifact_Changeset $previous_changeset The changeset just before (null for a new artifact)
  *
  * @return void
  */
 public function after(array $fields_data, Tracker_Artifact_Changeset $new_changeset, Tracker_Artifact_Changeset $previous_changeset = null)
 {
     $this->logger->defineFingerprint($new_changeset->getArtifact()->getId());
     $this->logger->start(__METHOD__, $new_changeset->getId(), $previous_changeset ? $previous_changeset->getId() : 'null');
     if (isset($fields_data[$this->getFieldId()])) {
         $transition = $this->getCurrentTransition($fields_data, $previous_changeset);
         if ($transition) {
             $transition->after($new_changeset);
         }
     }
     $this->trigger_rules_manager->processTriggers($new_changeset);
     $this->logger->end(__METHOD__, $new_changeset->getId(), $previous_changeset ? $previous_changeset->getId() : 'null');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:23,代码来源:Workflow.class.php

示例11: processTriggers

 public function processTriggers(Tracker_Artifact_Changeset $changeset)
 {
     $this->logger->start(__METHOD__, $changeset->getId());
     $dar_rules = $this->dao->searchForInvolvedRulesIdsByChangesetId($changeset->getId());
     foreach ($dar_rules as $row) {
         $rule = $this->getRuleById($row['rule_id']);
         $this->logger->debug("Found matching rule " . json_encode($rule->fetchFormattedForJson()));
         $this->rules_processor->process($changeset->getArtifact(), $rule);
     }
     $this->logger->end(__METHOD__, $changeset->getId());
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:RulesManager.class.php


注:本文中的Tracker_Artifact_Changeset::getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。