Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / calendar / xaction / PhabricatorCalendarEventIconTransaction.php
blob44daa13811ff71facc6a1b0f54669c5e07f27803
1 <?php
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()) {
18 return true;
21 return false;
24 public function getTitle() {
25 $old = $this->getIconLabel($this->getOldValue());
26 $new = $this->getIconLabel($this->getNewValue());
28 return pht(
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());
39 return pht(
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);