Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / releeph / editor / ReleephProductEditor.php
blob4c3d69c97b70d31e795994c9395560594762999c
1 <?php
3 final class ReleephProductEditor
4 extends PhabricatorApplicationTransactionEditor {
6 public function getEditorApplicationClass() {
7 return 'PhabricatorReleephApplication';
10 public function getEditorObjectsDescription() {
11 return pht('Releeph Products');
14 public function getTransactionTypes() {
15 $types = parent::getTransactionTypes();
17 $types[] = ReleephProductTransaction::TYPE_ACTIVE;
19 return $types;
22 protected function getCustomTransactionOldValue(
23 PhabricatorLiskDAO $object,
24 PhabricatorApplicationTransaction $xaction) {
26 switch ($xaction->getTransactionType()) {
27 case ReleephProductTransaction::TYPE_ACTIVE:
28 return (int)$object->getIsActive();
32 protected function getCustomTransactionNewValue(
33 PhabricatorLiskDAO $object,
34 PhabricatorApplicationTransaction $xaction) {
36 switch ($xaction->getTransactionType()) {
37 case ReleephProductTransaction::TYPE_ACTIVE:
38 return (int)$xaction->getNewValue();
42 protected function applyCustomInternalTransaction(
43 PhabricatorLiskDAO $object,
44 PhabricatorApplicationTransaction $xaction) {
45 $new = $xaction->getNewValue();
47 switch ($xaction->getTransactionType()) {
48 case ReleephProductTransaction::TYPE_ACTIVE:
49 $object->setIsActive($new);
50 break;
54 protected function applyCustomExternalTransaction(
55 PhabricatorLiskDAO $object,
56 PhabricatorApplicationTransaction $xaction) {
58 return;