[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class HeraldRuleEditor 4 extends PhabricatorApplicationTransactionEditor { 5 6 public function getEditorApplicationClass() { 7 return 'PhabricatorHeraldApplication'; 8 } 9 10 public function getEditorObjectsDescription() { 11 return pht('Herald Rules'); 12 } 13 14 public function getTransactionTypes() { 15 $types = parent::getTransactionTypes(); 16 17 $types[] = PhabricatorTransactions::TYPE_COMMENT; 18 $types[] = HeraldRuleTransaction::TYPE_DISABLE; 19 20 return $types; 21 } 22 23 protected function getCustomTransactionOldValue( 24 PhabricatorLiskDAO $object, 25 PhabricatorApplicationTransaction $xaction) { 26 27 switch ($xaction->getTransactionType()) { 28 case HeraldRuleTransaction::TYPE_DISABLE: 29 return (int)$object->getIsDisabled(); 30 } 31 32 } 33 34 protected function getCustomTransactionNewValue( 35 PhabricatorLiskDAO $object, 36 PhabricatorApplicationTransaction $xaction) { 37 38 switch ($xaction->getTransactionType()) { 39 case HeraldRuleTransaction::TYPE_DISABLE: 40 return (int)$xaction->getNewValue(); 41 } 42 43 } 44 45 protected function applyCustomInternalTransaction( 46 PhabricatorLiskDAO $object, 47 PhabricatorApplicationTransaction $xaction) { 48 49 switch ($xaction->getTransactionType()) { 50 case HeraldRuleTransaction::TYPE_DISABLE: 51 return $object->setIsDisabled($xaction->getNewValue()); 52 } 53 54 } 55 56 protected function applyCustomExternalTransaction( 57 PhabricatorLiskDAO $object, 58 PhabricatorApplicationTransaction $xaction) { 59 return; 60 } 61 62 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |