Page MenuHomec4science

PhabricatorRepositoryNotifyTransaction.php
No OneTemporary

File Metadata

Created
Wed, Jan 1, 13:22

PhabricatorRepositoryNotifyTransaction.php

<?php
final class PhabricatorRepositoryNotifyTransaction
extends PhabricatorRepositoryTransactionType {
const TRANSACTIONTYPE = 'repo:notify';
public function generateOldValue($object) {
return (int)!$object->getDetail('herald-disabled');
}
public function generateNewValue($object, $value) {
return (int)$value;
}
public function applyInternalEffects($object, $value) {
$object->setDetail('herald-disabled', (int)!$value);
}
public function getTitle() {
$new = $this->getNewValue();
if ($new) {
return pht(
'%s enabled notifications and publishing for this repository.',
$this->renderAuthor());
} else {
return pht(
'%s disabled notifications and publishing for this repository.',
$this->renderAuthor());
}
}
}

Event Timeline