本文整理汇总了PHP中PhabricatorApplicationTransactionEditor::getIsNewObject方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorApplicationTransactionEditor::getIsNewObject方法的具体用法?PHP PhabricatorApplicationTransactionEditor::getIsNewObject怎么用?PHP PhabricatorApplicationTransactionEditor::getIsNewObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorApplicationTransactionEditor
的用法示例。
在下文中一共展示了PhabricatorApplicationTransactionEditor::getIsNewObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateTransactionMailBody
public function updateTransactionMailBody(PhabricatorMetaMTAMailBody $body, PhabricatorApplicationTransactionEditor $editor, array $xactions)
{
if ($editor->getIsNewObject()) {
return;
}
if ($editor->getIsCloseByCommit()) {
return;
}
$xaction = $editor->getDiffUpdateTransaction($xactions);
if (!$xaction) {
return;
}
$original = id(new DifferentialDiffQuery())->setViewer($this->getViewer())->withPHIDs(array($xaction->getOldValue()))->executeOne();
if (!$original) {
return;
}
$revision = $this->getObject();
$current = $revision->getActiveDiff();
$old_id = $original->getID();
$new_id = $current->getID();
$uri = '/' . $revision->getMonogram() . '?vs=' . $old_id . '&id=' . $new_id;
$uri = PhabricatorEnv::getProductionURI($uri);
$body->addTextSection(pht('CHANGES SINCE LAST UPDATE'), $uri);
}
示例2: updateTransactionMailBody
public function updateTransactionMailBody(PhabricatorMetaMTAMailBody $body, PhabricatorApplicationTransactionEditor $editor, array $xactions)
{
if (!$editor->getIsNewObject()) {
return;
}
$test_plan = $this->getValue();
if (!strlen(trim($test_plan))) {
return;
}
$body->addTextSection(pht('TEST PLAN'), $test_plan);
}
示例3: updateTransactionMailBody
public function updateTransactionMailBody(PhabricatorMetaMTAMailBody $body, PhabricatorApplicationTransactionEditor $editor, array $xactions)
{
if (!$editor->getIsNewObject()) {
return;
}
$summary = $this->getValue();
if (!strlen(trim($summary))) {
return;
}
$body->addRemarkupSection(pht('REVISION SUMMARY'), $summary);
}