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


PHP DifferentialRevision::setAuthorPHID方法代码示例

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


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

示例1: newRevisionFromConduitWithDiff

 public static function newRevisionFromConduitWithDiff(array $fields, DifferentialDiff $diff, $user_phid)
 {
     $revision = new DifferentialRevision();
     $revision->setPHID($revision->generatePHID());
     $revision->setAuthorPHID($user_phid);
     $revision->setStatus(DifferentialRevisionStatus::NEEDS_REVIEW);
     $editor = new DifferentialRevisionEditor($revision, $user_phid);
     $editor->copyFieldsFromConduit($fields);
     $editor->addDiff($diff, null);
     $editor->save();
     return $revision;
 }
开发者ID:hwang36,项目名称:phabricator,代码行数:12,代码来源:DifferentialRevisionEditor.php

示例2: newRevisionFromConduitWithDiff

 public static function newRevisionFromConduitWithDiff(array $fields, DifferentialDiff $diff, $user_phid)
 {
     $revision = new DifferentialRevision();
     $revision->setPHID($revision->generatePHID());
     $revision->setAuthorPHID($user_phid);
     $revision->setStatus(DifferentialRevisionStatus::NEEDS_REVIEW);
     $editor = new DifferentialRevisionEditor($revision, $user_phid);
     $editor->copyFieldsFromConduit($fields);
     $editor->addDiff($diff, null);
     $editor->save();
     // Tasks can only be updated after revision has been saved to the
     // database. Currently tasks are updated only when a revision is created.
     // UI must be used to modify tasks after creating one.
     $editor->updateTasks();
     return $revision;
 }
开发者ID:nguyennamtien,项目名称:phabricator,代码行数:16,代码来源:DifferentialRevisionEditor.php

示例3: initializeNewRevision

 private function initializeNewRevision(DifferentialRevision $revision)
 {
     // These fields aren't nullable; set them to sensible defaults if they
     // haven't been configured. We're just doing this so we can generate an
     // ID for the revision if we don't have one already.
     $revision->setLineCount(0);
     if ($revision->getStatus() === null) {
         $revision->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW);
     }
     if ($revision->getTitle() === null) {
         $revision->setTitle('Untitled Revision');
     }
     if ($revision->getAuthorPHID() === null) {
         $revision->setAuthorPHID($this->getActorPHID());
     }
     if ($revision->getSummary() === null) {
         $revision->setSummary('');
     }
     if ($revision->getTestPlan() === null) {
         $revision->setTestPlan('');
     }
 }
开发者ID:nexeck,项目名称:phabricator,代码行数:22,代码来源:DifferentialRevisionEditor.php


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