本文整理汇总了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;
}
示例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;
}