本文整理汇总了PHP中DifferentialRevision::setStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP DifferentialRevision::setStatus方法的具体用法?PHP DifferentialRevision::setStatus怎么用?PHP DifferentialRevision::setStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DifferentialRevision
的用法示例。
在下文中一共展示了DifferentialRevision::setStatus方法的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;
}
示例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;
}
示例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('');
}
}