本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例7: mergeTransactions
protected function mergeTransactions(PhabricatorApplicationTransaction $u, PhabricatorApplicationTransaction $v)
{
$type = $u->getTransactionType();
switch ($type) {
}
return parent::mergeTransactions($u, $v);
}