mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-17 17:28:42 +01:00
Summary: Moves PhameBlog over to the wonderful world of modular transactions and the riches that lay beyond... Test Plan: - Create Blog - Edit Blog - Set Header - Delete Header - Add picture - Archive blog - Set incorrect domain values - Be irresponsible with subtitle length - Activate blog - Change description Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D17815
34 lines
766 B
PHP
34 lines
766 B
PHP
<?php
|
|
|
|
final class PhameBlogProfileImageTransaction
|
|
extends PhameBlogTransactionType {
|
|
|
|
// TODO: Migrate these transactions ha ha .... ha
|
|
const TRANSACTIONTYPE = 'phame.blog.header.image';
|
|
|
|
public function generateOldValue($object) {
|
|
return $object->getProfileImagePHID();
|
|
}
|
|
|
|
public function applyInternalEffects($object, $value) {
|
|
$object->setProfileImagePHID($value);
|
|
}
|
|
|
|
public function getTitle() {
|
|
return pht(
|
|
'%s changed the profile image for this blog.',
|
|
$this->renderAuthor());
|
|
}
|
|
|
|
public function getTitleForFeed() {
|
|
return pht(
|
|
'%s changed the profile image for blog %s.',
|
|
$this->renderAuthor(),
|
|
$this->renderObject());
|
|
}
|
|
|
|
public function getIcon() {
|
|
return 'fa-file-image-o';
|
|
}
|
|
|
|
}
|