本文整理汇总了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();
}
示例2: shouldHide
public final function shouldHide()
{
if ($this->getTransactionImplementation()->shouldHide()) {
return true;
}
return parent::shouldHide();
}
示例3: shouldHide
public function shouldHide()
{
switch ($this->getTransactionType()) {
case self::TYPE_QUESTION_ID:
return true;
}
return parent::shouldHide();
}
示例4: shouldHide
public function shouldHide()
{
$old = $this->getOldValue();
switch ($this->getTransactionType()) {
case self::TYPE_DESCRIPTION:
return $old === null;
}
return parent::shouldHide();
}
示例5: shouldHide
public function shouldHide()
{
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case PhabricatorMacroTransactionType::TYPE_NAME:
return $old === null;
}
return parent::shouldHide();
}
示例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();
}
示例7: shouldHide
public function shouldHide()
{
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_LAYOUT_MODE:
return true;
}
return parent::shouldHide();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}