Differential D19877 Diff 47467 src/applications/people/xaction/PhabricatorUserDisableTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/xaction/PhabricatorUserDisableTransaction.php
| Show All 9 Lines | final class PhabricatorUserDisableTransaction | ||||
| } | } | ||||
| public function generateNewValue($object, $value) { | public function generateNewValue($object, $value) { | ||||
| return (bool)$value; | return (bool)$value; | ||||
| } | } | ||||
| public function applyInternalEffects($object, $value) { | public function applyInternalEffects($object, $value) { | ||||
| $object->setIsDisabled((int)$value); | $object->setIsDisabled((int)$value); | ||||
| } | |||||
| public function applyExternalEffects($object, $value) { | |||||
| $this->newUserLog(PhabricatorUserLog::ACTION_DISABLE) | $this->newUserLog(PhabricatorUserLog::ACTION_DISABLE) | ||||
| ->setOldValue((bool)$object->getIsDisabled()) | ->setOldValue((bool)$object->getIsDisabled()) | ||||
| ->setNewValue((bool)$value) | ->setNewValue((bool)$value) | ||||
| ->save(); | ->save(); | ||||
| } | } | ||||
| public function getTitle() { | public function getTitle() { | ||||
| $new = $this->getNewValue(); | $new = $this->getNewValue(); | ||||
| ▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines | |||||