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


PHP PhabricatorApplicationTransactionEditor::mergeTransactions方法代码示例

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


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

示例1: mergeTransactions

 protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v)
 {
     $type = $u->getTransactionType();
     switch ($type) {
         case PhabricatorConfigTransaction::TYPE_EDIT:
             return $v;
     }
     return parent::mergeTransactions($u, $v);
 }
开发者ID:pugong,项目名称:phabricator,代码行数:9,代码来源:PhabricatorConfigEditor.php

示例2: mergeTransactions

 protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v)
 {
     $type = $u->getTransactionType();
     switch ($type) {
         case PhabricatorAuthProviderConfigTransaction::TYPE_ENABLE:
         case PhabricatorAuthProviderConfigTransaction::TYPE_LOGIN:
         case PhabricatorAuthProviderConfigTransaction::TYPE_REGISTRATION:
         case PhabricatorAuthProviderConfigTransaction::TYPE_LINK:
         case PhabricatorAuthProviderConfigTransaction::TYPE_UNLINK:
         case PhabricatorAuthProviderConfigTransaction::TYPE_TRUST_EMAILS:
         case PhabricatorAuthProviderConfigTransaction::TYPE_AUTO_LOGIN:
             // For these types, last transaction wins.
             return $v;
     }
     return parent::mergeTransactions($u, $v);
 }
开发者ID:pugong,项目名称:phabricator,代码行数:16,代码来源:PhabricatorAuthProviderConfigEditor.php

示例3: mergeTransactions

 protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v)
 {
     $type = $u->getTransactionType();
     switch ($type) {
         case PholioTransactionType::TYPE_NAME:
         case PholioTransactionType::TYPE_DESCRIPTION:
         case PholioTransactionType::TYPE_STATUS:
             return $v;
         case PholioTransactionType::TYPE_IMAGE_REPLACE:
             $u_img = $u->getNewValue();
             $v_img = $v->getNewValue();
             if ($u_img->getReplacesImagePHID() == $v_img->getReplacesImagePHID()) {
                 return $v;
             }
             break;
         case PholioTransactionType::TYPE_IMAGE_FILE:
             return $this->mergePHIDOrEdgeTransactions($u, $v);
         case PholioTransactionType::TYPE_IMAGE_NAME:
         case PholioTransactionType::TYPE_IMAGE_DESCRIPTION:
         case PholioTransactionType::TYPE_IMAGE_SEQUENCE:
             $raw_new_value_u = $u->getNewValue();
             $raw_new_value_v = $v->getNewValue();
             $phid_u = key($raw_new_value_u);
             $phid_v = key($raw_new_value_v);
             if ($phid_u == $phid_v) {
                 return $v;
             }
             break;
     }
     return parent::mergeTransactions($u, $v);
 }
开发者ID:denghp,项目名称:phabricator,代码行数:31,代码来源:PholioMockEditor.php

示例4: mergeTransactions

 protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v)
 {
     $type = $u->getTransactionType();
     switch ($type) {
         case ConpherenceTransaction::TYPE_TITLE:
             return $v;
         case ConpherenceTransaction::TYPE_FILES:
         case ConpherenceTransaction::TYPE_PARTICIPANTS:
             return $this->mergePHIDOrEdgeTransactions($u, $v);
     }
     return parent::mergeTransactions($u, $v);
 }
开发者ID:patelhardik,项目名称:phabricator,代码行数:12,代码来源:ConpherenceEditor.php

示例5: mergeTransactions

 protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v)
 {
     $type = $u->getTransactionType();
     switch ($type) {
         case LegalpadTransaction::TYPE_TITLE:
         case LegalpadTransaction::TYPE_TEXT:
         case LegalpadTransaction::TYPE_SIGNATURE_TYPE:
         case LegalpadTransaction::TYPE_PREAMBLE:
         case LegalpadTransaction::TYPE_REQUIRE_SIGNATURE:
             return $v;
     }
     return parent::mergeTransactions($u, $v);
 }
开发者ID:hrb518,项目名称:phabricator,代码行数:13,代码来源:LegalpadDocumentEditor.php

示例6: mergeTransactions

 protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v)
 {
     $type = $u->getTransactionType();
     switch ($type) {
         case PhabricatorMacroTransaction::TYPE_NAME:
         case PhabricatorMacroTransaction::TYPE_DISABLED:
         case PhabricatorMacroTransaction::TYPE_FILE:
         case PhabricatorMacroTransaction::TYPE_AUDIO:
         case PhabricatorMacroTransaction::TYPE_AUDIO_BEHAVIOR:
             return $v;
     }
     return parent::mergeTransactions($u, $v);
 }
开发者ID:pugong,项目名称:phabricator,代码行数:13,代码来源:PhabricatorMacroEditor.php

示例7: mergeTransactions

 protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v)
 {
     $type = $u->getTransactionType();
     switch ($type) {
     }
     return parent::mergeTransactions($u, $v);
 }
开发者ID:denghp,项目名称:phabricator,代码行数:7,代码来源:PhabricatorRepositoryEditor.php


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