当前位置: 首页>>代码示例>>PHP>>正文


PHP PhabricatorApplicationTransaction::getTitle方法代码示例

本文整理汇总了PHP中PhabricatorApplicationTransaction::getTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorApplicationTransaction::getTitle方法的具体用法?PHP PhabricatorApplicationTransaction::getTitle怎么用?PHP PhabricatorApplicationTransaction::getTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PhabricatorApplicationTransaction的用法示例。


在下文中一共展示了PhabricatorApplicationTransaction::getTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getTitle

 public function getTitle()
 {
     $author_phid = $this->getAuthorPHID();
     $object_phid = $this->getObjectPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     $type = $this->getTransactionType();
     switch ($type) {
         case self::TYPE_CONTENT:
             if ($old === null) {
                 return pht('%s created this paste.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s edited the content of this paste.', $this->renderHandleLink($author_phid));
             }
             break;
         case self::TYPE_TITLE:
             return pht('%s updated the paste\'s title to "%s".', $this->renderHandleLink($author_phid), $new);
             break;
         case self::TYPE_LANGUAGE:
             return pht("%s updated the paste's language.", $this->renderHandleLink($author_phid));
             break;
         case self::TYPE_STATUS:
             return pht("%s updated the paste's status.", $this->renderHandleLink($author_phid));
             break;
     }
     return parent::getTitle();
 }
开发者ID:shrimpma,项目名称:phabricator,代码行数:27,代码来源:PhabricatorPasteTransaction.php

示例2: getTitle

 public function getTitle()
 {
     $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 this blog.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s updated the blog\'s name to "%s".', $this->renderHandleLink($author_phid), $new);
             }
             break;
         case self::TYPE_DESCRIPTION:
             return pht('%s updated the blog\'s description.', $this->renderHandleLink($author_phid));
             break;
         case self::TYPE_DOMAIN:
             return pht('%s updated the blog\'s domain to "%s".', $this->renderHandleLink($author_phid), $new);
             break;
         case self::TYPE_SKIN:
             return pht('%s updated the blog\'s skin to "%s".', $this->renderHandleLink($author_phid), $new);
             break;
     }
     return parent::getTitle();
 }
开发者ID:fengshao0907,项目名称:phabricator,代码行数:28,代码来源:PhameBlogTransaction.php

示例3: getTitle

 public function getTitle()
 {
     $author_phid = $this->getAuthorPHID();
     $object_phid = $this->getObjectPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     $type = $this->getTransactionType();
     switch ($type) {
         case self::TYPE_TITLE:
             if ($old === null) {
                 return pht('%s created this countdown.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s renamed this countdown from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new);
             }
             break;
         case self::TYPE_DESCRIPTION:
             if ($old === null) {
                 return pht('%s set the description of this countdown.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s edited the description of this countdown.', $this->renderHandleLink($author_phid));
             }
             break;
         case self::TYPE_EPOCH:
             if ($old === null) {
                 return pht('%s set this countdown to end on %s.', $this->renderHandleLink($author_phid), phabricator_datetime($new, $this->getViewer()));
             } else {
                 if ($old != $new) {
                     return pht('%s updated this countdown to end on %s.', $this->renderHandleLink($author_phid), phabricator_datetime($new, $this->getViewer()));
                 }
             }
             break;
     }
     return parent::getTitle();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:34,代码来源:PhabricatorCountdownTransaction.php

示例4: getTitle

 public function getTitle()
 {
     $author_phid = $this->getAuthorPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     $type = $this->getTransactionType();
     switch ($type) {
         case self::TYPE_NAME:
             if (strlen($old)) {
                 return pht('%s renamed this form from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new);
             } else {
                 return pht('%s named this form "%s".', $this->renderHandleLink($author_phid), $new);
             }
         case self::TYPE_PREAMBLE:
             return pht('%s updated the preamble for this form.', $this->renderHandleLink($author_phid));
         case self::TYPE_ORDER:
             return pht('%s reordered the fields in this form.', $this->renderHandleLink($author_phid));
         case self::TYPE_DEFAULT:
             $key = $this->getMetadataValue('field.key');
             return pht('%s changed the default value for field "%s".', $this->renderHandleLink($author_phid), $key);
         case self::TYPE_LOCKS:
             return pht('%s changed locked and hidden fields.', $this->renderHandleLink($author_phid));
     }
     return parent::getTitle();
 }
开发者ID:Escalation,项目名称:phabricator,代码行数:25,代码来源:PhabricatorEditEngineConfigurationTransaction.php

示例5: getTitle

 public function getTitle()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     $author_phid = $this->getAuthorPHID();
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
             if ($old === null) {
                 return pht('%s created this space.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s renamed this space from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new);
             }
         case self::TYPE_DESCRIPTION:
             return pht('%s updated the description for this space.', $this->renderHandleLink($author_phid));
         case self::TYPE_DEFAULT:
             return pht('%s made this the default space.', $this->renderHandleLink($author_phid));
         case self::TYPE_ARCHIVE:
             if ($new) {
                 return pht('%s archived this space.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s activated this space.', $this->renderHandleLink($author_phid));
             }
     }
     return parent::getTitle();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:25,代码来源:PhabricatorSpacesNamespaceTransaction.php

示例6: getTitle

 public function getTitle()
 {
     $author_phid = $this->getAuthorPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_QUESTION:
             if ($old === null) {
                 return pht('%s created this poll.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s changed the poll question from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new);
             }
             break;
         case self::TYPE_DESCRIPTION:
             return pht('%s updated the description for this poll.', $this->renderHandleLink($author_phid));
         case self::TYPE_RESPONSES:
             // TODO: This could be more detailed
             return pht('%s changed who can see the responses.', $this->renderHandleLink($author_phid));
         case self::TYPE_SHUFFLE:
             if ($new) {
                 return pht('%s made poll responses appear in a random order.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s made poll responses appear in a fixed order.', $this->renderHandleLink($author_phid));
             }
             break;
         case self::TYPE_CLOSE:
             if ($new) {
                 return pht('%s closed this poll.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s reopened this poll.', $this->renderHandleLink($author_phid));
             }
             break;
     }
     return parent::getTitle();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:35,代码来源:PhabricatorSlowvoteTransaction.php

示例7: getTitle

 public function getTitle()
 {
     $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 asked this question.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s edited the question title from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new);
             }
         case self::TYPE_CONTENT:
             return pht('%s edited the question description.', $this->renderHandleLink($author_phid));
         case self::TYPE_ANSWERWIKI:
             return pht('%s edited the question answer wiki.', $this->renderHandleLink($author_phid));
         case self::TYPE_ANSWERS:
             $answer_handle = $this->getHandle($this->getNewAnswerPHID());
             $question_handle = $this->getHandle($object_phid);
             return pht('%s answered %s', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
         case self::TYPE_STATUS:
             switch ($new) {
                 case PonderQuestionStatus::STATUS_OPEN:
                     return pht('%s reopened this question.', $this->renderHandleLink($author_phid));
                 case PonderQuestionStatus::STATUS_CLOSED_RESOLVED:
                     return pht('%s closed this question as resolved.', $this->renderHandleLink($author_phid));
                 case PonderQuestionStatus::STATUS_CLOSED_OBSOLETE:
                     return pht('%s closed this question as obsolete.', $this->renderHandleLink($author_phid));
                 case PonderQuestionStatus::STATUS_CLOSED_INVALID:
                     return pht('%s closed this question as invalid.', $this->renderHandleLink($author_phid));
             }
     }
     return parent::getTitle();
 }
开发者ID:truSense,项目名称:phabricator,代码行数:35,代码来源:PonderQuestionTransaction.php

示例8: getTitle

 public function getTitle()
 {
     $author_phid = $this->getAuthorPHID();
     $object_phid = $this->getObjectPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     $type = $this->getTransactionType();
     switch ($type) {
         case self::TYPE_TITLE:
             if ($old === null) {
                 return pht('%s created this post.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s updated the post\'s name to "%s".', $this->renderHandleLink($author_phid), $new);
             }
             break;
         case self::TYPE_BODY:
             return pht('%s updated the post\'s body.', $this->renderHandleLink($author_phid));
             break;
         case self::TYPE_PHAME_TITLE:
             return pht('%s updated the post\'s phame title to "%s".', $this->renderHandleLink($author_phid), rtrim($new, '/'));
             break;
         case self::TYPE_COMMENTS_WIDGET:
             return pht('%s updated the post\'s comment widget to "%s".', $this->renderHandleLink($author_phid), $new);
             break;
     }
     return parent::getTitle();
 }
开发者ID:fengshao0907,项目名称:phabricator,代码行数:27,代码来源:PhamePostTransaction.php

示例9: getTitle

 public function getTitle()
 {
     $author_phid = $this->getAuthorPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
             if ($old === null) {
                 return pht('%s created this device.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s renamed this device from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new);
             }
             break;
         case self::TYPE_INTERFACE:
             if ($old && $new) {
                 return pht('%s changed interface %s on this device to %s.', $this->renderHandleLink($author_phid), $this->describeInterface($old), $this->describeInterface($new));
             } else {
                 if ($old) {
                     return pht('%s removed the interface %s from this device.', $this->renderHandleLink($author_phid), $this->describeInterface($new));
                 } else {
                     if ($new) {
                         return pht('%s added the interface %s to this device.', $this->renderHandleLink($author_phid), $this->describeInterface($new));
                     }
                 }
             }
     }
     return parent::getTitle();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:28,代码来源:AlmanacDeviceTransaction.php

示例10: getTitle

 public function getTitle()
 {
     $author_phid = $this->getAuthorPHID();
     $object_phid = $this->getObjectPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     $author_link = $this->renderHandleLink($author_phid);
     $type = $this->getTransactionType();
     switch ($type) {
         case self::TYPE_NAME:
             if (!strlen($old)) {
                 return pht('%s created this dashboard.', $author_link);
             } else {
                 return pht('%s renamed this dashboard from "%s" to "%s".', $author_link, $old, $new);
             }
             break;
         case self::TYPE_STATUS:
             if ($new == PhabricatorDashboard::STATUS_ACTIVE) {
                 return pht('%s activated this dashboard', $author_link);
             } else {
                 return pht('%s archived this dashboard', $author_link);
             }
             break;
     }
     return parent::getTitle();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:26,代码来源:PhabricatorDashboardTransaction.php

示例11: getTitle

 public function getTitle()
 {
     $author_phid = $this->getAuthorPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_EDIT:
             // TODO: After T2213 show the actual values too; for now, we don't
             // have the tools to do it without making a bit of a mess of it.
             $old_del = idx($old, 'deleted');
             $new_del = idx($new, 'deleted');
             if ($old_del && !$new_del) {
                 return pht('%s created this configuration entry.', $this->renderHandleLink($author_phid));
             } else {
                 if (!$old_del && $new_del) {
                     return pht('%s deleted this configuration entry.', $this->renderHandleLink($author_phid));
                 } else {
                     if ($old_del && $new_del) {
                         // This is a bug.
                         return pht('%s deleted this configuration entry (again?).', $this->renderHandleLink($author_phid));
                     } else {
                         return pht('%s edited this configuration entry.', $this->renderHandleLink($author_phid));
                     }
                 }
             }
             break;
     }
     return parent::getTitle();
 }
开发者ID:denghp,项目名称:phabricator,代码行数:29,代码来源:PhabricatorConfigTransaction.php

示例12: getTitle

 public function getTitle()
 {
     $author_phid = $this->getAuthorPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
             if ($old === null) {
                 return pht('%s created this account.', $this->renderHandleLink($author_phid));
             } else {
                 return pht('%s renamed this account from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new);
             }
             break;
         case PhabricatorTransactions::TYPE_EDGE:
             switch ($this->getMetadataValue('edge:type')) {
                 case PhabricatorEdgeConfig::TYPE_ACCOUNT_HAS_MEMBER:
                     $add = array_diff(array_keys($new), array_keys($old));
                     $rem = array_diff(array_keys($old), array_keys($new));
                     if ($add && $rem) {
                         return pht('%s changed account members, added %s; removed %s.', $this->renderHandleLink($author_phid), $this->renderHandleList($add), $this->renderHandleList($rem));
                     } else {
                         if ($add) {
                             return pht('%s added account members: %s', $this->renderHandleLink($author_phid), $this->renderHandleList($add));
                         } else {
                             return pht('%s removed account members: %s', $this->renderHandleLink($author_phid), $this->renderHandleList($add));
                         }
                     }
                     break;
             }
             break;
     }
     return parent::getTitle();
 }
开发者ID:denghp,项目名称:phabricator,代码行数:33,代码来源:PhortuneAccountTransaction.php

示例13: getTitle

 public function getTitle()
 {
     $author_phid = $this->getAuthorPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_TITLE:
         case self::TYPE_TOPIC:
         case PhabricatorTransactions::TYPE_VIEW_POLICY:
         case PhabricatorTransactions::TYPE_EDIT_POLICY:
         case PhabricatorTransactions::TYPE_JOIN_POLICY:
         case self::TYPE_PICTURE:
             return $this->getRoomTitle();
             break;
         case self::TYPE_PARTICIPANTS:
             $add = array_diff($new, $old);
             $rem = array_diff($old, $new);
             if ($add && $rem) {
                 $title = pht('%s edited participant(s), added %d: %s; removed %d: %s.', $this->renderHandleLink($author_phid), count($add), $this->renderHandleList($add), count($rem), $this->renderHandleList($rem));
             } else {
                 if ($add) {
                     $title = pht('%s added %d participant(s): %s.', $this->renderHandleLink($author_phid), count($add), $this->renderHandleList($add));
                 } else {
                     $title = pht('%s removed %d participant(s): %s.', $this->renderHandleLink($author_phid), count($rem), $this->renderHandleList($rem));
                 }
             }
             return $title;
             break;
     }
     return parent::getTitle();
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:31,代码来源:ConpherenceTransaction.php

示例14: getTitleForFeed

 public function getTitleForFeed()
 {
     $author_phid = $this->getAuthorPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_EDIT:
             $old_del = idx($old, 'deleted');
             $new_del = idx($new, 'deleted');
             if ($old_del && !$new_del) {
                 return pht('%s created %s.', $this->renderHandleLink($author_phid), $this->getObject()->getConfigKey());
             } else {
                 if (!$old_del && $new_del) {
                     return pht('%s deleted %s.', $this->renderHandleLink($author_phid), $this->getObject()->getConfigKey());
                 } else {
                     if ($old_del && $new_del) {
                         // This is a bug.
                         return pht('%s deleted %s (again?).', $this->renderHandleLink($author_phid), $this->getObject()->getConfigKey());
                     } else {
                         return pht('%s edited %s.', $this->renderHandleLink($author_phid), $this->getObject()->getConfigKey());
                     }
                 }
             }
             break;
     }
     return parent::getTitle();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:27,代码来源:PhabricatorConfigTransaction.php

示例15: getTitle

 public function getTitle()
 {
     $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 edited %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
             }
             break;
         case self::TYPE_STATUS:
             if ($new == PonderAnswerStatus::ANSWER_STATUS_VISIBLE) {
                 return pht('%s marked %s as visible.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
             } else {
                 if ($new == PonderAnswerStatus::ANSWER_STATUS_HIDDEN) {
                     return pht('%s marked %s as hidden.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid));
                 }
             }
             break;
     }
     return parent::getTitle();
 }
开发者ID:patelhardik,项目名称:phabricator,代码行数:26,代码来源:PonderAnswerTransaction.php


注:本文中的PhabricatorApplicationTransaction::getTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。