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


PHP DiffusionRequest::getCallsign方法代码示例

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


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

示例1: buildActionView

 protected function buildActionView(DiffusionRequest $drequest)
 {
     $viewer = $this->getRequest()->getUser();
     $view = id(new PhabricatorActionListView())->setUser($viewer);
     $history_uri = $drequest->generateURI(array('action' => 'history'));
     $view->addAction(id(new PhabricatorActionView())->setName(pht('View History'))->setHref($history_uri)->setIcon('fa-list'));
     $behind_head = $drequest->getSymbolicCommit();
     $head_uri = $drequest->generateURI(array('commit' => '', 'action' => 'browse'));
     $view->addAction(id(new PhabricatorActionView())->setName(pht('Jump to HEAD'))->setHref($head_uri)->setIcon('fa-home')->setDisabled(!$behind_head));
     // TODO: Ideally, this should live in Owners and be event-triggered, but
     // there's no reasonable object for it to react to right now.
     $owners = 'PhabricatorOwnersApplication';
     if (PhabricatorApplication::isClassInstalled($owners)) {
         $owners_uri = id(new PhutilURI('/owners/view/search/'))->setQueryParams(array('repository' => $drequest->getCallsign(), 'path' => '/' . $drequest->getPath()));
         $view->addAction(id(new PhabricatorActionView())->setName(pht('Find Owners'))->setHref((string) $owners_uri)->setIcon('fa-users'));
     }
     return $view;
 }
开发者ID:hrb518,项目名称:phabricator,代码行数:18,代码来源:DiffusionBrowseController.php

示例2: renderBrowse

 private static function renderBrowse(DiffusionRequest $drequest, $path, $name = null, $rev = null, $line = null, $view = null, $title = null)
 {
     $callsign = $drequest->getCallsign();
     if ($name === null) {
         $name = $path;
     }
     $at = null;
     if ($rev) {
         $at = ';' . $rev;
     }
     if ($view) {
         $view = '?view=' . $view;
     }
     if ($line) {
         $line = '$' . $line;
     }
     return phutil_render_tag('a', array('href' => "/diffusion/{$callsign}/browse/{$path}{$at}{$line}{$view}", 'title' => $title), $name);
 }
开发者ID:rudimk,项目名称:phabricator,代码行数:18,代码来源:DiffusionBrowseFileController.php


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