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
;
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);
54 protected function applyCustomExternalTransaction(
55 PhabricatorLiskDAO
$object,
56 PhabricatorApplicationTransaction
$xaction) {