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


PHP PhabricatorApplicationTransaction::shouldHide方法代码示例

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


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

示例1: shouldHide

 public function shouldHide()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_UPDATE:
             // Older versions of this transaction have an ID for the new value,
             // and/or do not record the old value. Only hide the transaction if
             // the new value is a PHID, indicating that this is a newer style
             // transaction.
             if ($old === null) {
                 if (phid_get_type($new) == DifferentialDiffPHIDType::TYPECONST) {
                     return true;
                 }
             }
             break;
         case PhabricatorTransactions::TYPE_EDGE:
             $add = array_diff_key($new, $old);
             $rem = array_diff_key($old, $new);
             // Hide metadata-only edge transactions. These correspond to users
             // accepting or rejecting revisions, but the change is always explicit
             // because of the TYPE_ACTION transaction. Rendering these transactions
             // just creates clutter.
             if (!$add && !$rem) {
                 return true;
             }
             break;
     }
     return parent::shouldHide();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:30,代码来源:DifferentialTransaction.php

示例2: shouldHide

 public final function shouldHide()
 {
     if ($this->getTransactionImplementation()->shouldHide()) {
         return true;
     }
     return parent::shouldHide();
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:7,代码来源:PhabricatorModularTransaction.php

示例3: shouldHide

 public function shouldHide()
 {
     switch ($this->getTransactionType()) {
         case self::TYPE_QUESTION_ID:
             return true;
     }
     return parent::shouldHide();
 }
开发者ID:patelhardik,项目名称:phabricator,代码行数:8,代码来源:PonderAnswerTransaction.php

示例4: shouldHide

 public function shouldHide()
 {
     $old = $this->getOldValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_DESCRIPTION:
             return $old === null;
     }
     return parent::shouldHide();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:9,代码来源:PhameBlogTransaction.php

示例5: shouldHide

 public function shouldHide()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case PhabricatorMacroTransactionType::TYPE_NAME:
             return $old === null;
     }
     return parent::shouldHide();
 }
开发者ID:denghp,项目名称:phabricator,代码行数:10,代码来源:PhabricatorMacroTransaction.php

示例6: shouldHide

 public function shouldHide()
 {
     $old = $this->getOldValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_PHAME_TITLE:
         case self::TYPE_BODY:
             return $old === null;
     }
     return parent::shouldHide();
 }
开发者ID:miaokuan,项目名称:phabricator,代码行数:10,代码来源:PhamePostTransaction.php

示例7: shouldHide

 public function shouldHide()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_LAYOUT_MODE:
             return true;
     }
     return parent::shouldHide();
 }
开发者ID:hrb518,项目名称:phabricator,代码行数:10,代码来源:PhabricatorDashboardTransaction.php

示例8: shouldHide

 public function shouldHide()
 {
     $old = $this->getOldValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_TITLE:
         case self::TYPE_TEXT:
             return $old === null;
         case self::TYPE_SIGNATURE_TYPE:
             return true;
     }
     return parent::shouldHide();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:12,代码来源:LegalpadTransaction.php

示例9: shouldHide

 public function shouldHide()
 {
     $old = $this->getOldValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_DESCRIPTION:
         case self::TYPE_CONTACTINFO:
         case self::TYPE_INVOICEEMAIL:
         case self::TYPE_INVOICEFOOTER:
             return $old === null;
     }
     return parent::shouldHide();
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:12,代码来源:PhortuneMerchantTransaction.php

示例10: shouldHide

 public function shouldHide()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_DESCRIPTION:
         case self::TYPE_RESPONSES:
         case self::TYPE_SHUFFLE:
         case self::TYPE_CLOSE:
             return $old === null;
     }
     return parent::shouldHide();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:13,代码来源:PhabricatorSlowvoteTransaction.php

示例11: shouldHide

 public function shouldHide()
 {
     switch ($this->getTransactionType()) {
         case self::TYPE_CONTENT:
             if ($this->getOldValue() === null) {
                 return true;
             } else {
                 return false;
             }
             break;
     }
     return parent::shouldHide();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:13,代码来源:PhrictionTransaction.php

示例12: shouldHide

 public function shouldHide()
 {
     $old = $this->getOldValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_TITLE:
         case self::TYPE_LANGUAGE:
             if ($old === null) {
                 return true;
             }
             break;
     }
     return parent::shouldHide();
 }
开发者ID:truSense,项目名称:phabricator,代码行数:13,代码来源:PhabricatorPasteTransaction.php

示例13: shouldHide

 public function shouldHide()
 {
     switch ($this->getTransactionType()) {
         case PhabricatorTransactions::TYPE_EDGE:
             $edge_type = $this->getMetadataValue('edge:type');
             switch ($edge_type) {
                 case PhabricatorProjectSilencedEdgeType::EDGECONST:
                     return true;
                 default:
                     break;
             }
     }
     return parent::shouldHide();
 }
开发者ID:endlessm,项目名称:phabricator,代码行数:14,代码来源:PhabricatorProjectTransaction.php

示例14: shouldHide

 public function shouldHide()
 {
     $old = $this->getOldValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_DESCRIPTION:
             return $old === null;
         case self::TYPE_LOCK:
             return $old === null;
         case self::TYPE_USERNAME:
             return !strlen($old);
         case self::TYPE_LOOKEDATSECRET:
             return false;
     }
     return parent::shouldHide();
 }
开发者ID:patelhardik,项目名称:phabricator,代码行数:15,代码来源:PassphraseCredentialTransaction.php

示例15: shouldHide

 public function shouldHide()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_DESCRIPTION:
             if ($old === null) {
                 return true;
             }
             break;
         case self::TYPE_PRIMARY:
             // TODO: Eventually, remove these transactions entirely.
             return true;
     }
     return parent::shouldHide();
 }
开发者ID:mduan,项目名称:phabricator,代码行数:16,代码来源:PhabricatorOwnersPackageTransaction.php


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