本文整理汇总了PHP中DifferentialRevision::setPHID方法的典型用法代码示例。如果您正苦于以下问题:PHP DifferentialRevision::setPHID方法的具体用法?PHP DifferentialRevision::setPHID怎么用?PHP DifferentialRevision::setPHID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DifferentialRevision
的用法示例。
在下文中一共展示了DifferentialRevision::setPHID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW);
$editor = new DifferentialRevisionEditor($revision, $user_phid);
$editor->copyFieldsFromConduit($fields);
$editor->addDiff($diff, null);
$editor->save();
return $revision;
}
示例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;
}