本文整理汇总了PHP中PhabricatorApplicationTransaction::getTitleForFeed方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorApplicationTransaction::getTitleForFeed方法的具体用法?PHP PhabricatorApplicationTransaction::getTitleForFeed怎么用?PHP PhabricatorApplicationTransaction::getTitleForFeed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorApplicationTransaction
的用法示例。
在下文中一共展示了PhabricatorApplicationTransaction::getTitleForFeed方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTitleForFeed
public function getTitleForFeed(PhabricatorFeedStory $story)
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
$type = $this->getTransactionType();
switch ($type) {
case FundInitiativeTransaction::TYPE_NAME:
if ($old === null) {
return pht('%s created %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
} else {
return pht('%s renamed %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
break;
case FundInitiativeTransaction::TYPE_DESCRIPTION:
return pht('%s updated the description for %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
case FundInitiativeTransaction::TYPE_STATUS:
switch ($new) {
case FundInitiative::STATUS_OPEN:
return pht('%s reopened %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
case FundInitiative::STATUS_CLOSED:
return pht('%s closed %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
break;
}
return parent::getTitleForFeed($story);
}
示例2: getTitleForFeed
public function getTitleForFeed()
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
$author_link = $this->renderHandleLink($author_phid);
$object_link = $this->renderHandleLink($object_phid);
$type = $this->getTransactionType();
switch ($type) {
case self::TYPE_NAME:
if (!strlen($old)) {
return pht('%s created dashboard %s.', $author_link, $object_link);
} else {
return pht('%s renamed dashboard %s from "%s" to "%s".', $author_link, $object_link, $old, $new);
}
break;
case self::TYPE_STATUS:
if ($new == PhabricatorDashboard::STATUS_ACTIVE) {
return pht('%s activated dashboard %s.', $author_link, $object_link);
} else {
return pht('%s archived dashboard %s.', $author_link, $object_link);
}
break;
}
return parent::getTitleForFeed();
}
示例3: getTitleForFeed
public function getTitleForFeed(PhabricatorFeedStory $story)
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
$author_link = $this->renderHandleLink($author_phid);
$object_link = $this->renderHandleLink($object_phid);
$type = $this->getTransactionType();
switch ($type) {
case self::TYPE_NAME:
if (!strlen($old)) {
return pht('%s created dashboard panel %s.', $author_link, $object_link);
} else {
return pht('%s renamed dashboard panel %s from "%s" to "%s".', $author_link, $object_link, $old, $new);
}
case self::TYPE_ARCHIVE:
if ($new) {
return pht('%s archived dashboard panel %s.', $author_link, $object_link);
} else {
return pht('%s activated dashboard panel %s.', $author_link, $object_link);
}
}
return parent::getTitleForFeed($story);
}
示例4: getTitleForFeed
public final function getTitleForFeed()
{
$title = $this->getTransactionImplementation()->getTitleForFeed();
if ($title !== null) {
return $title;
}
return parent::getTitleForFeed();
}
示例5: getTitleForFeed
public function getTitleForFeed(PhabricatorFeedStory $story)
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
switch ($this->getTransactionType()) {
case self::TYPE_CONTENT:
return pht('%s updated %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
return parent::getTitleForFeed($story);
}
示例6: getTitleForFeed
public function getTitleForFeed()
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
$type = $this->getTransactionType();
switch ($type) {
case self::TYPE_NAME:
return pht('%s updated the name of %s from "%s" to "%s".', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid), $old, $new);
break;
}
return parent::getTitleForFeed();
}
示例7: getTitleForFeed
public function getTitleForFeed()
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
$type = $this->getTransactionType();
switch ($type) {
case self::TYPE_TITLE:
return pht('%s renamed %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
case self::TYPE_DESCRIPTION:
return pht('%s edited the description of %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
case self::TYPE_EPOCH:
return pht('%s edited the end date of %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
return parent::getTitleForFeed();
}
示例8: getTitleForFeed
public function getTitleForFeed()
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_ACTIVE:
if ($new) {
return pht('%s activated release product %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
} else {
return pht('%s deactivated release product %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
break;
}
return parent::getTitleForFeed();
}
示例9: getTitleForFeed
public function getTitleForFeed()
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_CONTENT:
if ($old === '') {
return pht('%s added %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
} else {
return pht('%s updated %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
break;
}
return parent::getTitleForFeed();
}
示例10: getTitleForFeed
public function getTitleForFeed()
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
$type = $this->getTransactionType();
switch ($type) {
case self::TYPE_TITLE:
if (strlen($old) && strlen($new)) {
return pht('%s renamed %s from "%s" to "%s".', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid), $old, $new);
} else {
return pht('%s created the room %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
break;
break;
case self::TYPE_TOPIC:
if (strlen($new)) {
return pht('%s set the topic of %s to "%s".', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid), $new);
} else {
if (strlen($old)) {
return pht('%s deleted the topic in %s', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
}
break;
case self::TYPE_PICTURE:
return pht('%s updated the room image for %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
break;
}
return parent::getTitleForFeed();
}
示例11: getTitleForFeed
public function getTitleForFeed()
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_TITLE:
if ($old === null) {
return pht('%s created %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
return pht('%s renamed %s from "%s" to "%s".', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid), $old, $new);
case self::TYPE_CONTENT:
return pht('%s edited the content of %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
case self::TYPE_DELETE:
return pht('%s deleted %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
return parent::getTitleForFeed();
}
示例12: getTitleForFeed
public function getTitleForFeed()
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
$type = $this->getTransactionType();
switch ($type) {
case PhabricatorTransactions::TYPE_CREATE:
return pht('%s authored %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
case self::TYPE_BLOG:
return pht('%s moved post "%s" from "%s" to "%s".', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid), $this->renderHandleLink($old), $this->renderHandleLink($new));
case self::TYPE_TITLE:
if ($old === null) {
return pht('%s authored %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
} else {
return pht('%s updated the name for %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
break;
case self::TYPE_SUBTITLE:
return pht('%s updated the subtitle for %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
break;
case self::TYPE_BODY:
return pht('%s updated the blog post %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
break;
case self::TYPE_HEADERIMAGE:
return pht('%s updated the header image for post %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
break;
case self::TYPE_VISIBILITY:
if ($new == PhameConstants::VISIBILITY_DRAFT) {
return pht('%s marked %s as a draft.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
} else {
if ($new == PhameConstants::VISIBILITY_ARCHIVED) {
return pht('%s marked %s as archived.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
} else {
return pht('%s published %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
}
break;
}
return parent::getTitleForFeed();
}
示例13: getTitleForFeed
public function getTitleForFeed()
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
$viewer = $this->getViewer();
$type = $this->getTransactionType();
switch ($type) {
case self::TYPE_NAME:
if ($old === null) {
return pht('%s created %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
} else {
return pht('%s changed the name of %s from %s to %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid), $old, $new);
}
case self::TYPE_URL:
if ($old === null) {
return pht('%s set the destination of %s to %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid), $new);
} else {
return pht('%s changed the destination of %s from %s to %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid), $old, $new);
}
case self::TYPE_ALIAS:
if ($old === null) {
return pht('%s set the alias of %s to %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid), $new);
} else {
if ($new === null) {
return pht('%s removed the alias of %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
} else {
return pht('%s changed the alias of %s from %s to %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid), $old, $new);
}
}
case self::TYPE_DESCRIPTION:
return pht('%s updated the description of %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
return parent::getTitleForFeed();
}
示例14: getTitleForFeed
public function getTitleForFeed()
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
$type = $this->getTransactionType();
switch ($type) {
case self::TYPE_NAME:
if ($old === null) {
return pht('%s created %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
} else {
return pht('%s renamed %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
break;
case self::TYPE_FLAVOR:
return pht('%s updated the flavor text for %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
case self::TYPE_ICON:
return pht('%s updated the icon for %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
case self::TYPE_QUALITY:
return pht('%s updated the quality level for %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
case self::TYPE_DESCRIPTION:
return pht('%s updated the description for %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
case self::TYPE_STATUS:
switch ($new) {
case PhabricatorBadgesBadge::STATUS_ACTIVE:
return pht('%s activated %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
case PhabricatorBadgesBadge::STATUS_ARCHIVED:
return pht('%s archived %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
break;
}
return parent::getTitleForFeed();
}
示例15: getTitleForFeed
public function getTitleForFeed()
{
$author_phid = $this->getAuthorPHID();
$object_phid = $this->getObjectPHID();
$old = $this->getOldValue();
$new = $this->getNewValue();
$type = $this->getTransactionType();
switch ($type) {
case self::TYPE_NAME:
if ($old === null) {
return pht('%s created %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
} else {
return pht('%s updated the name for %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
break;
case self::TYPE_DESCRIPTION:
return pht('%s updated the description for %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
break;
case self::TYPE_DOMAIN:
return pht('%s updated the domain for %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
break;
case self::TYPE_STATUS:
switch ($new) {
case PhameBlog::STATUS_ACTIVE:
return pht('%s published the blog %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
case PhameBlog::STATUS_ARCHIVED:
return pht('%s archived the blog %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
}
break;
}
return parent::getTitleForFeed();
}