3 final class PhameBlogStatusTransaction
4 extends PhameBlogTransactionType
{
6 const TRANSACTIONTYPE
= 'phame.blog.status';
8 public function generateOldValue($object) {
9 return $object->getStatus();
12 public function applyInternalEffects($object, $value) {
13 $object->setStatus($value);
16 public function getTitle() {
17 $new = $this->getNewValue();
19 case PhameBlog
::STATUS_ACTIVE
:
21 '%s published this blog.',
22 $this->renderAuthor());
23 case PhameBlog
::STATUS_ARCHIVED
:
25 '%s archived this blog.',
26 $this->renderAuthor());
30 public function getTitleForFeed() {
31 $new = $this->getNewValue();
33 case PhameBlog
::STATUS_ACTIVE
:
35 '%s published the blog %s.',
36 $this->renderAuthor(),
37 $this->renderObject());
38 case PhameBlog
::STATUS_ARCHIVED
:
40 '%s archived the blog %s.',
41 $this->renderAuthor(),
42 $this->renderObject());
46 public function getIcon() {
47 $new = $this->getNewValue();
48 if ($new == PhameBlog
::STATUS_ARCHIVED
) {