Differential D20659 Diff 49281 src/applications/auth/xaction/PhabricatorAuthConfigUnlinkTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/xaction/PhabricatorAuthConfigUnlinkTransaction.php
- This file was added.
<?php | |||||
final class PhabricatorAuthConfigUnlinkTransaction | |||||
extends PhabricatorAuthConfigTransactionType { | |||||
const TRANSACTIONTYPE = 'config:unlink'; | |||||
public function generateOldValue($object) { | |||||
return (int)$object->getShouldAllowUnlink(); | |||||
} | |||||
public function applyInternalEffects($object, $value) { | |||||
$object->setShouldAllowUnlink($value); | |||||
} | |||||
public function getTitle() { | |||||
if ($this->getNewValue()) { | |||||
return pht('%s enabled account unlinking.', | |||||
$this->renderAuthor()); | |||||
} else { | |||||
return pht('%s disabled account unlinking.', | |||||
$this->renderAuthor()); | |||||
} | |||||
} | |||||
} |