本文整理汇总了PHP中PhabricatorApplicationTransaction::renderHandleLink方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorApplicationTransaction::renderHandleLink方法的具体用法?PHP PhabricatorApplicationTransaction::renderHandleLink怎么用?PHP PhabricatorApplicationTransaction::renderHandleLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorApplicationTransaction
的用法示例。
在下文中一共展示了PhabricatorApplicationTransaction::renderHandleLink方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getApplicationTransactionTitleForFeed
public function getApplicationTransactionTitleForFeed(PhabricatorApplicationTransaction $xaction)
{
$object_phid = $xaction->getObjectPHID();
$author_phid = $xaction->getAuthorPHID();
$old = $xaction->getOldValue();
$new = $xaction->getNewValue();
return pht('%s updated the test plan for %s.', $xaction->renderHandleLink($author_phid), $xaction->renderHandleLink($object_phid));
}
示例2: getApplicationTransactionTitle
public function getApplicationTransactionTitle(PhabricatorApplicationTransaction $xaction)
{
$author_phid = $xaction->getAuthorPHID();
$old = $xaction->getOldValue();
$new = $xaction->getNewValue();
if ($new) {
return pht('%s checked %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName());
} else {
return pht('%s unchecked %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName());
}
}
示例3: getApplicationTransactionTitleForFeed
public function getApplicationTransactionTitleForFeed(PhabricatorApplicationTransaction $xaction, PhabricatorFeedStory $story)
{
$object_phid = $xaction->getObjectPHID();
$author_phid = $xaction->getAuthorPHID();
$old = $xaction->getOldValue();
$new = $xaction->getNewValue();
if (strlen($old)) {
return pht('%s retitled %s, from "%s" to "%s".', $xaction->renderHandleLink($author_phid), $xaction->renderHandleLink($object_phid), $old, $new);
} else {
return pht('%s created %s.', $xaction->renderHandleLink($author_phid), $xaction->renderHandleLink($object_phid));
}
}
示例4: getApplicationTransactionTitleForFeed
public function getApplicationTransactionTitleForFeed(PhabricatorApplicationTransaction $xaction)
{
$object_phid = $xaction->getObjectPHID();
$author_phid = $xaction->getAuthorPHID();
$old = $xaction->getOldValue();
$new = $xaction->getNewValue();
if ($old && $new) {
return pht('%s updated the repository for %s from %s to %s.', $xaction->renderHandleLink($author_phid), $xaction->renderHandleLink($object_phid), $xaction->renderHandleLink($old), $xaction->renderHandleLink($new));
} else {
if ($new) {
return pht('%s set the repository for %s to %s.', $xaction->renderHandleLink($author_phid), $xaction->renderHandleLink($object_phid), $xaction->renderHandleLink($new));
} else {
return pht('%s removed the repository for %s. (Repository was %s.)', $xaction->renderHandleLink($author_phid), $xaction->renderHandleLink($object_phid), $xaction->renderHandleLink($old));
}
}
}
示例5: getApplicationTransactionTitle
public function getApplicationTransactionTitle(PhabricatorApplicationTransaction $xaction)
{
$author_phid = $xaction->getAuthorPHID();
$old = $xaction->getOldValue();
$new = $xaction->getNewValue();
$old = idx($this->getOptions(), $old, $old);
$new = idx($this->getOptions(), $new, $new);
if (!$old) {
return pht('%s set %s to %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName(), $new);
} else {
if (!$new) {
return pht('%s removed %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName());
} else {
return pht('%s changed %s from %s to %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName(), $old, $new);
}
}
}
示例6: getApplicationTransactionTitle
public function getApplicationTransactionTitle(PhabricatorApplicationTransaction $xaction)
{
$author_phid = $xaction->getAuthorPHID();
$old = $this->decodeValue($xaction->getOldValue());
$new = $this->decodeValue($xaction->getNewValue());
$add = array_diff($new, $old);
$rem = array_diff($old, $new);
if ($add && !$rem) {
return pht('%s updated %s, added %d: %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName(), new PhutilNumber(count($add)), $xaction->renderHandleList($add));
} else {
if ($rem && !$add) {
return pht('%s updated %s, removed %d: %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName(), new PhutilNumber(count($rem)), $xaction->renderHandleList($rem));
} else {
return pht('%s updated %s, added %d: %s; removed %d: %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName(), new PhutilNumber(count($add)), $xaction->renderHandleList($add), new PhutilNumber(count($rem)), $xaction->renderHandleList($rem));
}
}
}
示例7: getApplicationTransactionTitle
public function getApplicationTransactionTitle(PhabricatorApplicationTransaction $xaction)
{
$author_phid = $xaction->getAuthorPHID();
// TODO: Expose fancy transactions.
return pht('%s edited %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName());
}
示例8: getApplicationTransactionTitle
public function getApplicationTransactionTitle(PhabricatorApplicationTransaction $xaction)
{
$old = $xaction->getOldValue();
if (!is_array($old)) {
$old = array();
}
$new = $xaction->getNewValue();
if (!is_array($new)) {
$new = array();
}
$add = array_diff($new, $old);
$rem = array_diff($old, $new);
$author_phid = $xaction->getAuthorPHID();
if ($add && $rem) {
return pht('%s updated JIRA issue(s): added %d %s; removed %d %s.', $xaction->renderHandleLink($author_phid), phutil_count($add), implode(', ', $add), phutil_count($rem), implode(', ', $rem));
} else {
if ($add) {
return pht('%s added %d JIRA issue(s): %s.', $xaction->renderHandleLink($author_phid), phutil_count($add), implode(', ', $add));
} else {
if ($rem) {
return pht('%s removed %d JIRA issue(s): %s.', $xaction->renderHandleLink($author_phid), phutil_count($rem), implode(', ', $rem));
}
}
}
return parent::getApplicationTransactionTitle($xaction);
}
示例9: getApplicationTransactionTitle
public function getApplicationTransactionTitle(PhabricatorApplicationTransaction $xaction)
{
$author_phid = $xaction->getAuthorPHID();
$old = $xaction->getOldValue();
$new = $xaction->getNewValue();
$viewer = $this->getViewer();
$old_date = null;
if ($old) {
$old_date = phabricator_datetime($old, $viewer);
}
$new_date = null;
if ($new) {
$new_date = phabricator_datetime($new, $viewer);
}
if (!$old) {
return pht('%s set %s to %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName(), $new_date);
} else {
if (!$new) {
return pht('%s removed %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName());
} else {
return pht('%s changed %s from %s to %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName(), $old_date, $new_date);
}
}
}
示例10: getApplicationTransactionTitleForFeed
public function getApplicationTransactionTitleForFeed(PhabricatorApplicationTransaction $xaction)
{
$author_phid = $xaction->getAuthorPHID();
$object_phid = $xaction->getObjectPHID();
return pht('%s edited %s on %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName(), $xaction->renderHandleLink($object_phid));
}
示例11: getApplicationTransactionTitleForFeed
public function getApplicationTransactionTitleForFeed(PhabricatorApplicationTransaction $xaction)
{
$viewer = $this->getViewer();
$author_phid = $xaction->getAuthorPHID();
$object_phid = $xaction->getObjectPHID();
$old = $xaction->getOldValue();
$new = $xaction->getNewValue();
if (!$old) {
return pht('%s set %s to %s on %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName(), phabricator_datetime($new, $viewer), $xaction->renderHandleLink($object_phid));
} else {
if (!$new) {
return pht('%s removed %s on %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName(), $xaction->renderHandleLink($object_phid));
} else {
return pht('%s changed %s from %s to %s on %s.', $xaction->renderHandleLink($author_phid), $this->getFieldName(), phabricator_datetime($old, $viewer), phabricator_datetime($new, $viewer), $xaction->renderHandleLink($object_phid));
}
}
}