Page MenuHomestyx hydra

ReleephProductEditor.php
No OneTemporary

ReleephProductEditor.php

<?php
final class ReleephProductEditor
extends PhabricatorApplicationTransactionEditor {
public function getEditorApplicationClass() {
return 'PhabricatorReleephApplication';
}
public function getEditorObjectsDescription() {
return pht('Releeph Products');
}
public function getTransactionTypes() {
$types = parent::getTransactionTypes();
$types[] = ReleephProductTransaction::TYPE_ACTIVE;
return $types;
}
protected function getCustomTransactionOldValue(
PhabricatorLiskDAO $object,
PhabricatorApplicationTransaction $xaction) {
switch ($xaction->getTransactionType()) {
case ReleephProductTransaction::TYPE_ACTIVE:
return (int)$object->getIsActive();
}
}
protected function getCustomTransactionNewValue(
PhabricatorLiskDAO $object,
PhabricatorApplicationTransaction $xaction) {
switch ($xaction->getTransactionType()) {
case ReleephProductTransaction::TYPE_ACTIVE:
return (int)$xaction->getNewValue();
}
}
protected function applyCustomInternalTransaction(
PhabricatorLiskDAO $object,
PhabricatorApplicationTransaction $xaction) {
$new = $xaction->getNewValue();
switch ($xaction->getTransactionType()) {
case ReleephProductTransaction::TYPE_ACTIVE:
$object->setIsActive($new);
break;
}
}
protected function applyCustomExternalTransaction(
PhabricatorLiskDAO $object,
PhabricatorApplicationTransaction $xaction) {
return;
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, Feb 24, 7:26 PM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
809533
Default Alt Text
ReleephProductEditor.php (1 KB)

Event Timeline