Changeset View
Changeset View
Standalone View
Standalone View
src/applications/releeph/storage/ReleephProductTransaction.php
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | switch ($this->getTransactionType()) { | ||||
$this->renderHandleLink($author_phid)); | $this->renderHandleLink($author_phid)); | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
return parent::getTitle(); | return parent::getTitle(); | ||||
} | } | ||||
public function getTitleForFeed(PhabricatorFeedStory $story) { | public function getTitleForFeed() { | ||||
$author_phid = $this->getAuthorPHID(); | $author_phid = $this->getAuthorPHID(); | ||||
$object_phid = $this->getObjectPHID(); | $object_phid = $this->getObjectPHID(); | ||||
$old = $this->getOldValue(); | $old = $this->getOldValue(); | ||||
$new = $this->getNewValue(); | $new = $this->getNewValue(); | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case self::TYPE_ACTIVE: | case self::TYPE_ACTIVE: | ||||
if ($new) { | if ($new) { | ||||
return pht( | return pht( | ||||
'%s activated release product %s.', | '%s activated release product %s.', | ||||
$this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
$this->renderHandleLink($object_phid)); | $this->renderHandleLink($object_phid)); | ||||
} else { | } else { | ||||
return pht( | return pht( | ||||
'%s deactivated release product %s.', | '%s deactivated release product %s.', | ||||
$this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
$this->renderHandleLink($object_phid)); | $this->renderHandleLink($object_phid)); | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
return parent::getTitleForFeed($story); | return parent::getTitleForFeed(); | ||||
} | } | ||||
public function getNoEffectDescription() { | public function getNoEffectDescription() { | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case self::TYPE_ACTIVE: | case self::TYPE_ACTIVE: | ||||
return pht('The product is already in that state.'); | return pht('The product is already in that state.'); | ||||
} | } | ||||
return parent::getNoEffectDescription(); | return parent::getNoEffectDescription(); | ||||
} | } | ||||
} | } |