Path: blob/master/src/applications/calendar/xaction/PhabricatorCalendarEventIconTransaction.php
12256 views
<?php12final class PhabricatorCalendarEventIconTransaction3extends PhabricatorCalendarEventTransactionType {45const TRANSACTIONTYPE = 'calendar.icon';67public function generateOldValue($object) {8return $object->getIcon();9}1011public function applyInternalEffects($object, $value) {12$object->setIcon($value);13}1415public function shouldHide() {16if ($this->isCreateTransaction()) {17return true;18}1920return false;21}2223public function getTitle() {24$old = $this->getIconLabel($this->getOldValue());25$new = $this->getIconLabel($this->getNewValue());2627return pht(28'%s changed the event icon from %s to %s.',29$this->renderAuthor(),30$this->renderValue($old),31$this->renderValue($new));32}3334public function getTitleForFeed() {35$old = $this->getIconLabel($this->getOldValue());36$new = $this->getIconLabel($this->getNewValue());3738return pht(39'%s changed the icon for %s from %s to %s.',40$this->renderAuthor(),41$this->renderObject(),42$this->renderValue($old),43$this->renderValue($new));44}4546private function getIconLabel($icon) {47$set = new PhabricatorCalendarIconSet();48return $set->getIconLabel($icon);49}5051}525354