1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-09 14:21:02 +01:00
phorge-phorge/src/applications/conpherence/xaction/ConpherenceThreadPictureTransaction.php
Chad Little a7ebfc12c0 Modernize Conpherence with Modular Transactions
Summary: Begin converting Conpherence to ModularTransactions, this converts title, topic, and picture to use modular transactions. Participants seems hairy so I'll do that in another diff

Test Plan: Create a room with a topic, change room name, topic. Add people, remove people. Set a room image. Unset topic.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17668
2017-04-12 16:33:57 -07:00

29 lines
619 B
PHP

<?php
final class ConpherenceThreadPictureTransaction
extends ConpherenceThreadTransactionType {
const TRANSACTIONTYPE = 'picture';
public function generateOldValue($object) {
return $object->getProfileImagePHID();
}
public function applyInternalEffects($object, $value) {
$object->setProfileImagePHID($value);
}
public function getTitle() {
return pht(
'%s updated the room image.',
$this->renderAuthor());
}
public function getTitleForFeed() {
return pht(
'%s updated the room image for %s.',
$this->renderAuthor(),
$this->renderObject());
}
}