3 final class PhabricatorCalendarEventIconTransaction
4 extends PhabricatorCalendarEventTransactionType
{
6 const TRANSACTIONTYPE
= 'calendar.icon';
8 public function generateOldValue($object) {
9 return $object->getIcon();
12 public function applyInternalEffects($object, $value) {
13 $object->setIcon($value);
16 public function shouldHide() {
17 if ($this->isCreateTransaction()) {
24 public function getTitle() {
25 $old = $this->getIconLabel($this->getOldValue());
26 $new = $this->getIconLabel($this->getNewValue());
29 '%s changed the event icon from %s to %s.',
30 $this->renderAuthor(),
31 $this->renderValue($old),
32 $this->renderValue($new));
35 public function getTitleForFeed() {
36 $old = $this->getIconLabel($this->getOldValue());
37 $new = $this->getIconLabel($this->getNewValue());
40 '%s changed the icon for %s from %s to %s.',
41 $this->renderAuthor(),
42 $this->renderObject(),
43 $this->renderValue($old),
44 $this->renderValue($new));
47 private function getIconLabel($icon) {
48 $set = new PhabricatorCalendarIconSet();
49 return $set->getIconLabel($icon);