Page MenuHomePhorge

PhabricatorSlowvoteStatusTransaction.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

PhabricatorSlowvoteStatusTransaction.php

<?php
final class PhabricatorSlowvoteStatusTransaction
extends PhabricatorSlowvoteTransactionType {
const TRANSACTIONTYPE = 'vote:status';
public function generateOldValue($object) {
return (string)$object->getStatus();
}
public function generateNewValue($object, $value) {
return (string)$value;
}
public function applyInternalEffects($object, $value) {
$object->setStatus($value);
}
public function getTitle() {
$old_name = $this->getOldStatusObject()->getName();
$new_name = $this->getNewStatusObject()->getName();
return pht(
'%s changed the status of this poll from %s to %s.',
$this->renderAuthor(),
$this->renderValue($old_name),
$this->renderValue($new_name));
}
public function getTitleForFeed() {
$old_name = $this->getOldStatusObject()->getName();
$new_name = $this->getNewStatusObject()->getName();
return pht(
'%s changed the status of %s from %s to %s.',
$this->renderAuthor(),
$this->renderObject(),
$this->renderValue($old_name),
$this->renderValue($new_name));
}
public function getIcon() {
return $this->getNewStatusObject()->getTransactionIcon();
}
private function getOldStatusObject() {
return $this->newStatusObject($this->getOldValue());
}
private function getNewStatusObject() {
return $this->newStatusObject($this->getNewValue());
}
private function newStatusObject($value) {
return SlowvotePollStatus::newStatusObject($value);
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 12, 6:46 PM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
102523
Default Alt Text
PhabricatorSlowvoteStatusTransaction.php (1 KB)

Event Timeline