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


PHP PhabricatorApplicationTransactionEditor::transactionHasEffect方法代码示例

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


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

示例1: transactionHasEffect

 protected function transactionHasEffect(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorAuditActionConstants::INLINE:
             return $xaction->hasComment();
     }
     return parent::transactionHasEffect($object, $xaction);
 }
开发者ID:denghp,项目名称:phabricator,代码行数:8,代码来源:PhabricatorAuditEditor.php

示例2: transactionHasEffect

 protected function transactionHasEffect(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorOwnersPackageTransaction::TYPE_PATHS:
             $old = $xaction->getOldValue();
             $new = $xaction->getNewValue();
             $diffs = PhabricatorOwnersPath::getTransactionValueChanges($old, $new);
             list($rem, $add) = $diffs;
             return $rem || $add;
     }
     return parent::transactionHasEffect($object, $xaction);
 }
开发者ID:JohnnyEstilles,项目名称:phabricator,代码行数:12,代码来源:PhabricatorOwnersPackageTransactionEditor.php

示例3: transactionHasEffect

 protected function transactionHasEffect(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $old = $xaction->getOldValue();
     $new = $xaction->getNewValue();
     $type = $xaction->getTransactionType();
     switch ($type) {
         case PhabricatorConfigTransaction::TYPE_EDIT:
             // If an edit deletes an already-deleted entry, no-op it.
             if (idx($old, 'deleted') && idx($new, 'deleted')) {
                 return false;
             }
             break;
     }
     return parent::transactionHasEffect($object, $xaction);
 }
开发者ID:pugong,项目名称:phabricator,代码行数:15,代码来源:PhabricatorConfigEditor.php

示例4: transactionHasEffect

 protected function transactionHasEffect(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $old = $xaction->getOldValue();
     $new = $xaction->getNewValue();
     switch ($xaction->getTransactionType()) {
         case PhabricatorSlowvoteTransaction::TYPE_RESPONSES:
             if ($old === null) {
                 return true;
             }
             return (int) $old !== (int) $new;
         case PhabricatorSlowvoteTransaction::TYPE_SHUFFLE:
             if ($old === null) {
                 return true;
             }
             return (bool) $old !== (bool) $new;
     }
     return parent::transactionHasEffect($object, $xaction);
 }
开发者ID:fengshao0907,项目名称:phabricator,代码行数:18,代码来源:PhabricatorSlowvoteEditor.php

示例5: transactionHasEffect

 protected function transactionHasEffect(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $old = $xaction->getOldValue();
     $new = $xaction->getNewValue();
     switch ($xaction->getTransactionType()) {
         case ManiphestTransaction::TYPE_PROJECT_COLUMN:
             $new_column_phids = $new['columnPHIDs'];
             $old_column_phids = $old['columnPHIDs'];
             sort($new_column_phids);
             sort($old_column_phids);
             return $old !== $new;
     }
     return parent::transactionHasEffect($object, $xaction);
 }
开发者ID:miaokuan,项目名称:phabricator,代码行数:14,代码来源:ManiphestTransactionEditor.php

示例6: transactionHasEffect

 protected function transactionHasEffect(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PholioTransactionType::TYPE_INLINE:
             return true;
     }
     return parent::transactionHasEffect($object, $xaction);
 }
开发者ID:denghp,项目名称:phabricator,代码行数:8,代码来源:PholioMockEditor.php

示例7: transactionHasEffect

 protected function transactionHasEffect(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $actor_phid = $this->getActingAsPHID();
     switch ($xaction->getTransactionType()) {
         case DifferentialTransaction::TYPE_INLINE:
             return $xaction->hasComment();
         case DifferentialTransaction::TYPE_ACTION:
             $status_closed = ArcanistDifferentialRevisionStatus::CLOSED;
             $status_abandoned = ArcanistDifferentialRevisionStatus::ABANDONED;
             $status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW;
             $status_revision = ArcanistDifferentialRevisionStatus::NEEDS_REVISION;
             $status_plan = ArcanistDifferentialRevisionStatus::CHANGES_PLANNED;
             $action_type = $xaction->getNewValue();
             switch ($action_type) {
                 case DifferentialAction::ACTION_ACCEPT:
                 case DifferentialAction::ACTION_REJECT:
                     if ($action_type == DifferentialAction::ACTION_ACCEPT) {
                         $new_status = DifferentialReviewerStatus::STATUS_ACCEPTED;
                     } else {
                         $new_status = DifferentialReviewerStatus::STATUS_REJECTED;
                     }
                     $actor = $this->getActor();
                     // These transactions can cause effects in two ways: by altering the
                     // status of an existing reviewer; or by adding the actor as a new
                     // reviewer.
                     $will_add_reviewer = true;
                     foreach ($object->getReviewerStatus() as $reviewer) {
                         if ($reviewer->hasAuthority($actor)) {
                             if ($reviewer->getStatus() != $new_status) {
                                 return true;
                             }
                         }
                         if ($reviewer->getReviewerPHID() == $actor_phid) {
                             $will_add_reviwer = false;
                         }
                     }
                     return $will_add_reviewer;
                 case DifferentialAction::ACTION_CLOSE:
                     return $object->getStatus() != $status_closed;
                 case DifferentialAction::ACTION_ABANDON:
                     return $object->getStatus() != $status_abandoned;
                 case DifferentialAction::ACTION_RECLAIM:
                     return $object->getStatus() == $status_abandoned;
                 case DifferentialAction::ACTION_REOPEN:
                     return $object->getStatus() == $status_closed;
                 case DifferentialAction::ACTION_RETHINK:
                     return $object->getStatus() != $status_plan;
                 case DifferentialAction::ACTION_REQUEST:
                     return $object->getStatus() != $status_review;
                 case DifferentialAction::ACTION_RESIGN:
                     foreach ($object->getReviewerStatus() as $reviewer) {
                         if ($reviewer->getReviewerPHID() == $actor_phid) {
                             return true;
                         }
                     }
                     return false;
                 case DifferentialAction::ACTION_CLAIM:
                     return $actor_phid != $object->getAuthorPHID();
             }
     }
     return parent::transactionHasEffect($object, $xaction);
 }
开发者ID:kristain,项目名称:phabricator,代码行数:62,代码来源:DifferentialTransactionEditor.php

示例8: transactionHasEffect

 protected function transactionHasEffect(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $old = $xaction->getOldValue();
     $new = $xaction->getNewValue();
     switch ($xaction->getTransactionType()) {
         case PhabricatorTransactions::TYPE_COLUMNS:
             return (bool) $new;
     }
     return parent::transactionHasEffect($object, $xaction);
 }
开发者ID:vinzent,项目名称:phabricator,代码行数:10,代码来源:ManiphestTransactionEditor.php

示例9: transactionHasEffect

 protected function transactionHasEffect(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $old = $xaction->getOldValue();
     $new = $xaction->getNewValue();
     $type = $xaction->getTransactionType();
     switch ($type) {
     }
     return parent::transactionHasEffect($object, $xaction);
 }
开发者ID:denghp,项目名称:phabricator,代码行数:9,代码来源:PhabricatorRepositoryEditor.php


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