Page MenuHomePhorge

DrydockBlueprintDisableTransaction.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

DrydockBlueprintDisableTransaction.php

<?php
final class DrydockBlueprintDisableTransaction
extends DrydockBlueprintTransactionType {
const TRANSACTIONTYPE = 'drydock:blueprint:disabled';
public function generateOldValue($object) {
return (bool)$object->getIsDisabled();
}
public function generateNewValue($object, $value) {
return (bool)$value;
}
public function applyInternalEffects($object, $value) {
$object->setIsDisabled((int)$value);
}
public function getTitle() {
$new = $this->getNewValue();
if ($new) {
return pht(
'%s disabled this blueprint.',
$this->renderAuthor());
} else {
return pht(
'%s enabled this blueprint.',
$this->renderAuthor());
}
}
public function getTitleForFeed() {
$new = $this->getNewValue();
if ($new) {
return pht(
'%s disabled %s.',
$this->renderAuthor(),
$this->renderObject());
} else {
return pht(
'%s enabled %s.',
$this->renderAuthor(),
$this->renderObject());
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 12, 6:45 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
107082
Default Alt Text
DrydockBlueprintDisableTransaction.php (1 KB)

Event Timeline