Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / almanac / xaction / AlmanacBindingDisableTransaction.php
blob15926868357f934e59b052601dcbc48e988cfa58
1 <?php
3 final class AlmanacBindingDisableTransaction
4 extends AlmanacBindingTransactionType {
6 const TRANSACTIONTYPE = 'almanac:binding:disable';
8 public function generateOldValue($object) {
9 return (bool)$object->getIsDisabled();
12 public function applyInternalEffects($object, $value) {
13 $object->setIsDisabled((int)$value);
16 public function getTitle() {
17 if ($this->getNewValue()) {
18 return pht(
19 '%s disabled this binding.',
20 $this->renderAuthor());
21 } else {
22 return pht(
23 '%s enabled this binding.',
24 $this->renderAuthor());