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


PHP PhabricatorApplicationTransactionEditor::buildMailBody方法代码示例

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


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

示例1: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     $detail_uri = PhabricatorEnv::getProductionURI($object->getURI());
     $body->addLinkSection(pht('PACKAGE DETAIL'), $detail_uri);
     return $body;
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:7,代码来源:PhabricatorOwnersPackageTransactionEditor.php

示例2: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     $uri = '/project/profile/' . $object->getID() . '/';
     $body->addLinkSection(pht('PROJECT DETAIL'), PhabricatorEnv::getProductionURI($uri));
     return $body;
 }
开发者ID:jvlstudio,项目名称:phabricator,代码行数:7,代码来源:PhabricatorProjectTransactionEditor.php

示例3: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     $type_inline = DifferentialTransaction::TYPE_INLINE;
     $inlines = array();
     foreach ($xactions as $xaction) {
         if ($xaction->getTransactionType() == $type_inline) {
             $inlines[] = $xaction;
         }
     }
     $changed_uri = $this->getChangedPriorToCommitURI();
     if ($changed_uri) {
         $body->addTextSection(pht('CHANGED PRIOR TO COMMIT'), $changed_uri);
     }
     if ($inlines) {
         $body->addTextSection(pht('INLINE COMMENTS'), $this->renderInlineCommentsForMail($object, $inlines));
     }
     $body->addTextSection(pht('REVISION DETAIL'), PhabricatorEnv::getProductionURI('/D' . $object->getID()));
     $update_xaction = null;
     foreach ($xactions as $xaction) {
         switch ($xaction->getTransactionType()) {
             case DifferentialTransaction::TYPE_UPDATE:
                 $update_xaction = $xaction;
                 break;
         }
     }
     if ($update_xaction) {
         $diff = $this->requireDiff($update_xaction->getNewValue(), true);
         $body->addTextSection(pht('AFFECTED FILES'), $this->renderAffectedFilesForMail($diff));
         $config_key_inline = 'metamta.differential.inline-patches';
         $config_inline = PhabricatorEnv::getEnvConfig($config_key_inline);
         $config_key_attach = 'metamta.differential.attach-patches';
         $config_attach = PhabricatorEnv::getEnvConfig($config_key_attach);
         if ($config_inline || $config_attach) {
             $patch_section = $this->renderPatchForMail($diff);
             $lines = count(phutil_split_lines($patch_section->getPlaintext()));
             if ($config_inline && $lines <= $config_inline) {
                 $body->addTextSection(pht('CHANGE DETAILS'), $patch_section);
             }
             if ($config_attach) {
                 $name = pht('D%s.%s.patch', $object->getID(), $diff->getID());
                 $mime_type = 'text/x-patch; charset=utf-8';
                 $body->addAttachment(new PhabricatorMetaMTAAttachment($patch_section->getPlaintext(), $name, $mime_type));
             }
         }
     }
     return $body;
 }
开发者ID:sethkontny,项目名称:phabricator,代码行数:48,代码来源:DifferentialTransactionEditor.php

示例4: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     $type_inline = PhabricatorAuditActionConstants::INLINE;
     $inlines = array();
     foreach ($xactions as $xaction) {
         if ($xaction->getTransactionType() == $type_inline) {
             $inlines[] = $xaction;
         }
     }
     if ($inlines) {
         $body->addTextSection(pht('INLINE COMMENTS'), $this->renderInlineCommentsForMail($object, $inlines));
     }
     // Reload the commit to pull commit data.
     $commit = id(new DiffusionCommitQuery())->setViewer($this->requireActor())->withIDs(array($object->getID()))->needCommitData(true)->executeOne();
     $data = $commit->getCommitData();
     $user_phids = array();
     $author_phid = $commit->getAuthorPHID();
     if ($author_phid) {
         $user_phids[$commit->getAuthorPHID()][] = pht('Author');
     }
     $committer_phid = $data->getCommitDetail('committerPHID');
     if ($committer_phid && $committer_phid != $author_phid) {
         $user_phids[$committer_phid][] = pht('Committer');
     }
     // TODO: It would be nice to show pusher here too, but that information
     // is a little tricky to get at right now.
     if ($user_phids) {
         $handle_phids = array_keys($user_phids);
         $handles = id(new PhabricatorHandleQuery())->setViewer($this->requireActor())->withPHIDs($handle_phids)->execute();
         $user_info = array();
         foreach ($user_phids as $phid => $roles) {
             $user_info[] = pht('%s (%s)', $handles[$phid]->getName(), implode(', ', $roles));
         }
         $body->addTextSection(pht('USERS'), implode("\n", $user_info));
     }
     $monogram = $object->getRepository()->formatCommitName($object->getCommitIdentifier());
     $body->addTextSection(pht('COMMIT'), PhabricatorEnv::getProductionURI('/' . $monogram));
     return $body;
 }
开发者ID:denghp,项目名称:phabricator,代码行数:40,代码来源:PhabricatorAuditEditor.php

示例5: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     $body->addLinkSection(pht('CONPHERENCE DETAIL'), PhabricatorEnv::getProductionURI('/' . $object->getMonogram()));
     return $body;
 }
开发者ID:patelhardik,项目名称:phabricator,代码行数:6,代码来源:ConpherenceEditor.php

示例6: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     if ($this->getIsNewObject()) {
         $body->addRemarkupSection(pht('TASK DESCRIPTION'), $object->getDescription());
     }
     $body->addLinkSection(pht('TASK DETAIL'), PhabricatorEnv::getProductionURI('/T' . $object->getID()));
     $board_phids = array();
     $type_column = ManiphestTransaction::TYPE_PROJECT_COLUMN;
     foreach ($xactions as $xaction) {
         if ($xaction->getTransactionType() == $type_column) {
             $new = $xaction->getNewValue();
             $project_phid = idx($new, 'projectPHID');
             if ($project_phid) {
                 $board_phids[] = $project_phid;
             }
         }
     }
     if ($board_phids) {
         $projects = id(new PhabricatorProjectQuery())->setViewer($this->requireActor())->withPHIDs($board_phids)->execute();
         foreach ($projects as $project) {
             $body->addLinkSection(pht('WORKBOARD'), PhabricatorEnv::getProductionURI('/project/board/' . $project->getID() . '/'));
         }
     }
     return $body;
 }
开发者ID:miaokuan,项目名称:phabricator,代码行数:26,代码来源:ManiphestTransactionEditor.php

示例7: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     $body->addTextSection(pht('MACRO DETAIL'), PhabricatorEnv::getProductionURI('/macro/view/' . $object->getID() . '/'));
     return $body;
 }
开发者ID:denghp,项目名称:phabricator,代码行数:6,代码来源:PhabricatorMacroEditor.php

示例8: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     $body->addTextSection(pht('SECURITY WARNING'), pht('If you do not recognize this change, it may indicate your account ' . 'has been compromised.'));
     $detail_uri = $object->getURI();
     $detail_uri = PhabricatorEnv::getProductionURI($detail_uri);
     $body->addLinkSection(pht('SSH KEY DETAIL'), $detail_uri);
     return $body;
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:9,代码来源:PhabricatorAuthSSHKeyEditor.php

示例9: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $description = $object->getDescription();
     $body = parent::buildMailBody($object, $xactions);
     if (strlen($description)) {
         $body->addRemarkupSection(pht('EVENT DESCRIPTION'), $description);
     }
     $body->addLinkSection(pht('EVENT DETAIL'), PhabricatorEnv::getProductionURI('/E' . $object->getID()));
     $ics_attachment = $this->newICSAttachment($object);
     $body->addAttachment($ics_attachment);
     return $body;
 }
开发者ID:endlessm,项目名称:phabricator,代码行数:12,代码来源:PhabricatorCalendarEventEditor.php

示例10: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     if ($this->getIsNewObject()) {
         $body->addTextSection(pht('TASK DESCRIPTION'), $object->getDescription());
     }
     $body->addTextSection(pht('TASK DETAIL'), PhabricatorEnv::getProductionURI('/T' . $object->getID()));
     return $body;
 }
开发者ID:denghp,项目名称:phabricator,代码行数:9,代码来源:ManiphestTransactionEditor.php

示例11: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     $rq = $object;
     $releeph_branch = $rq->getBranch();
     $releeph_project = $releeph_branch->getProduct();
     /**
      * If any of the events we are emailing about were about a pick failure
      * (and/or a revert failure?), include pick failure instructions.
      */
     $has_pick_failure = false;
     foreach ($xactions as $xaction) {
         if ($xaction->getTransactionType() === ReleephRequestTransaction::TYPE_PICK_STATUS && $xaction->getNewValue() === ReleephRequest::PICK_FAILED) {
             $has_pick_failure = true;
             break;
         }
     }
     if ($has_pick_failure) {
         $instructions = $releeph_project->getDetail('pick_failure_instructions');
         if ($instructions) {
             $body->addTextSection(pht('PICK FAILURE INSTRUCTIONS'), $instructions);
         }
     }
     $name = sprintf('RQ%s: %s', $rq->getID(), $rq->getSummaryForDisplay());
     $body->addTextSection(pht('RELEEPH REQUEST'), $name . "\n" . PhabricatorEnv::getProductionURI('/RQ' . $rq->getID()));
     $project_and_branch = sprintf('%s - %s', $releeph_project->getName(), $releeph_branch->getDisplayNameWithDetail());
     $body->addTextSection(pht('RELEEPH BRANCH'), $project_and_branch . "\n" . PhabricatorEnv::getProductionURI($releeph_branch->getURI()));
     return $body;
 }
开发者ID:fengshao0907,项目名称:phabricator,代码行数:29,代码来源:ReleephRequestTransactionalEditor.php

示例12: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     if ($this->isInvoice()) {
         $issues = $this->getInvoiceIssues();
         foreach ($issues as $key => $issue) {
             $issues[$key] = '  - ' . $issue;
         }
         $issues = implode("\n", $issues);
         $overview = pht("Payment for this invoice could not be processed automatically:\n\n" . "%s", $issues);
         $body->addRemarkupSection(null, $overview);
         $body->addLinkSection(pht('PAY NOW'), PhabricatorEnv::getProductionURI($object->getCheckoutURI()));
     }
     $items = array();
     foreach ($object->getPurchases() as $purchase) {
         $name = $purchase->getFullDisplayName();
         $price = $purchase->getTotalPriceAsCurrency()->formatForDisplay();
         $items[] = "{$name} {$price}";
     }
     $body->addTextSection(pht('ORDER CONTENTS'), implode("\n", $items));
     if ($this->isInvoice()) {
         $subscription = id(new PhortuneSubscriptionQuery())->setViewer($this->requireActor())->withPHIDs(array($object->getSubscriptionPHID()))->executeOne();
         if ($subscription) {
             $body->addLinkSection(pht('SUBSCRIPTION'), PhabricatorEnv::getProductionURI($subscription->getURI()));
         }
     } else {
         $body->addLinkSection(pht('ORDER DETAIL'), PhabricatorEnv::getProductionURI($object->getDetailURI()));
     }
     $account_uri = '/phortune/' . $object->getAccount()->getID() . '/';
     $body->addLinkSection(pht('ACCOUNT OVERVIEW'), PhabricatorEnv::getProductionURI($account_uri));
     return $body;
 }
开发者ID:pugong,项目名称:phabricator,代码行数:32,代码来源:PhortuneCartEditor.php

示例13: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     if ($this->getIsNewObject()) {
         $body->addRemarkupSection(null, $object->getBody());
     }
     $body->addLinkSection(pht('POST DETAIL'), PhabricatorEnv::getProductionURI($object->getViewURI()));
     return $body;
 }
开发者ID:Escalation,项目名称:phabricator,代码行数:9,代码来源:PhamePostEditor.php

示例14: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     $body->addTextSection(pht('FILE DETAIL'), PhabricatorEnv::getProductionURI($object->getInfoURI()));
     return $body;
 }
开发者ID:denghp,项目名称:phabricator,代码行数:6,代码来源:PhabricatorFileEditor.php

示例15: buildMailBody

 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     // We don't send mail if the object is a draft, and we only want
     // to include the full body of the post on the either the
     // first creation or if it was created as a draft, once it goes live.
     if ($this->getIsNewObject()) {
         $body->addRemarkupSection(null, $object->getBody());
     } else {
         foreach ($xactions as $xaction) {
             switch ($xaction->getTransactionType()) {
                 case PhamePostTransaction::TYPE_VISIBILITY:
                     if (!$object->isDraft()) {
                         $body->addRemarkupSection(null, $object->getBody());
                     }
                     break;
             }
         }
     }
     $body->addLinkSection(pht('POST DETAIL'), PhabricatorEnv::getProductionURI($object->getViewURI()));
     return $body;
 }
开发者ID:truSense,项目名称:phabricator,代码行数:22,代码来源:PhamePostEditor.php


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