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


PHP GitRepository::getBackendType方法代码示例

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


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

示例1: getHeader

 private function getHeader()
 {
     $html = '';
     $repoId = $this->repository->getId();
     $creator = $this->repository->getCreator();
     $parent = $this->repository->getParent();
     $access = $this->repository->getAccess();
     $creatorName = '';
     if (!empty($creator)) {
         $creatorName = UserHelper::instance()->getLinkOnUserFromUserId($creator->getId());
     }
     // Access type
     $accessType = $this->getAccessType($access, $this->repository->getBackend() instanceof Git_Backend_Gitolite);
     $html .= '<h1>' . $accessType . $this->repository->getFullName() . '</h1>';
     if (!empty($parent)) {
         $html .= '<div id="plugin_git_repo_parent">';
         $html .= $GLOBALS['Language']->getText('plugin_git', 'view_repo_parent_' . $this->repository->getBackendType(), $parent->getHTMLLink($this->url_manager));
         $html .= '</div>';
     }
     return $html;
 }
开发者ID:blestab,项目名称:tuleap,代码行数:21,代码来源:Content.class.php

示例2: buildPanes

 /**
  * @return array
  */
 private function buildPanes(GitRepository $repository)
 {
     $panes = array(new GitViews_RepoManagement_Pane_GeneralSettings($repository, $this->request));
     if ($repository->getBackendType() == GitDao::BACKEND_GITOLITE) {
         $panes[] = new GitViews_RepoManagement_Pane_Gerrit($repository, $this->request, $this->driver_factory, $this->gerrit_servers, $this->gerrit_config_templates);
     }
     $panes[] = new GitViews_RepoManagement_Pane_AccessControl($repository, $this->request);
     $mirrors = $this->mirror_data_mapper->fetchAllForProject($repository->getProject());
     if (count($mirrors) > 0) {
         $repository_mirrors = $this->mirror_data_mapper->fetchAllRepositoryMirrors($repository);
         $panes[] = new GitViews_RepoManagement_Pane_Mirroring($repository, $this->request, $mirrors, $repository_mirrors);
     }
     $panes[] = new GitViews_RepoManagement_Pane_Notification($repository, $this->request);
     $panes[] = new GitViews_RepoManagement_Pane_Delete($repository, $this->request);
     $indexed_panes = array();
     foreach ($panes as $pane) {
         if ($pane->canBeDisplayed()) {
             $indexed_panes[$pane->getIdentifier()] = $pane;
         }
     }
     return $indexed_panes;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:25,代码来源:RepoManagement.class.php


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