Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / drydock / xaction / DrydockBlueprintDisableTransaction.php
blob216cea35f4063b4951626523325c76ffc4543a98
1 <?php
3 final class DrydockBlueprintDisableTransaction
4 extends DrydockBlueprintTransactionType {
6 const TRANSACTIONTYPE = 'drydock:blueprint:disabled';
8 public function generateOldValue($object) {
9 return (bool)$object->getIsDisabled();
12 public function generateNewValue($object, $value) {
13 return (bool)$value;
16 public function applyInternalEffects($object, $value) {
17 $object->setIsDisabled((int)$value);
20 public function getTitle() {
21 $new = $this->getNewValue();
22 if ($new) {
23 return pht(
24 '%s disabled this blueprint.',
25 $this->renderAuthor());
26 } else {
27 return pht(
28 '%s enabled this blueprint.',
29 $this->renderAuthor());
33 public function getTitleForFeed() {
34 $new = $this->getNewValue();
35 if ($new) {
36 return pht(
37 '%s disabled %s.',
38 $this->renderAuthor(),
39 $this->renderObject());
40 } else {
41 return pht(
42 '%s enabled %s.',
43 $this->renderAuthor(),
44 $this->renderObject());