Path: blob/master/src/applications/harbormaster/xaction/buildable/HarbormasterBuildableMessageTransaction.php
12264 views
<?php12final class HarbormasterBuildableMessageTransaction3extends HarbormasterBuildableTransactionType {45const TRANSACTIONTYPE = 'harbormaster:buildable:command';67public function generateOldValue($object) {8return null;9}1011public function getTitle() {12$new = $this->getNewValue();1314switch ($new) {15case HarbormasterBuildMessageRestartTransaction::MESSAGETYPE:16return pht(17'%s restarted this buildable.',18$this->renderAuthor());19case HarbormasterBuildMessageResumeTransaction::MESSAGETYPE:20return pht(21'%s resumed this buildable.',22$this->renderAuthor());23case HarbormasterBuildMessagePauseTransaction::MESSAGETYPE:24return pht(25'%s paused this buildable.',26$this->renderAuthor());27case HarbormasterBuildMessageAbortTransaction::MESSAGETYPE:28return pht(29'%s aborted this buildable.',30$this->renderAuthor());31}3233return parent::getTitle();34}3536public function getIcon() {37$new = $this->getNewValue();3839switch ($new) {40case HarbormasterBuildMessageRestartTransaction::MESSAGETYPE:41return 'fa-backward';42case HarbormasterBuildMessageResumeTransaction::MESSAGETYPE:43return 'fa-play';44case HarbormasterBuildMessagePauseTransaction::MESSAGETYPE:45return 'fa-pause';46case HarbormasterBuildMessageAbortTransaction::MESSAGETYPE:47return 'fa-exclamation-triangle';48}4950return parent::getIcon();51}5253public function getColor() {54$new = $this->getNewValue();5556switch ($new) {57case HarbormasterBuildMessagePauseTransaction::MESSAGETYPE:58return 'red';59}6061return parent::getColor();62}6364}656667