當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PluginManager::isPluginAllowedForProject方法代碼示例

本文整理匯總了PHP中PluginManager::isPluginAllowedForProject方法的典型用法代碼示例。如果您正苦於以下問題:PHP PluginManager::isPluginAllowedForProject方法的具體用法?PHP PluginManager::isPluginAllowedForProject怎麽用?PHP PluginManager::isPluginAllowedForProject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PluginManager的用法示例。


在下文中一共展示了PluginManager::isPluginAllowedForProject方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: calculateForWikiService

 private function calculateForWikiService($project_id)
 {
     if (!$this->plugin_manager->isPluginAllowedForProject($this->fulltextsearch_plugin, $project_id)) {
         return Search_SearchWiki::NAME;
     }
     return $this->getFullTextTypeName();
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:7,代碼來源:TypeOfSearchCalculator.class.php

示例2: __construct

 public function __construct(GitPlugin $plugin, Git_RemoteServer_GerritServerFactory $gerrit_server_factory, Git_Driver_Gerrit_GerritDriverFactory $driver_factory, GitRepositoryManager $repository_manager, Git_SystemEventManager $system_event_manager, Git_Driver_Gerrit_UserAccountManager $gerrit_usermanager, GitRepositoryFactory $git_repository_factory, UserManager $user_manager, ProjectManager $project_manager, PluginManager $plugin_manager, Codendi_Request $request, Git_Driver_Gerrit_ProjectCreator $project_creator, Git_Driver_Gerrit_Template_TemplateFactory $template_factory, GitPermissionsManager $permissions_manager, Git_GitRepositoryUrlManager $url_manager, Logger $logger, Git_Backend_Gitolite $backend_gitolite, Git_Mirror_MirrorDataMapper $mirror_data_mapper)
 {
     parent::__construct($user_manager, $request);
     $this->userManager = $user_manager;
     $this->projectManager = $project_manager;
     $this->factory = $git_repository_factory;
     $this->gerrit_server_factory = $gerrit_server_factory;
     $this->driver_factory = $driver_factory;
     $this->repository_manager = $repository_manager;
     $this->git_system_event_manager = $system_event_manager;
     $this->gerrit_usermanager = $gerrit_usermanager;
     $this->plugin_manager = $plugin_manager;
     $this->project_creator = $project_creator;
     $this->template_factory = $template_factory;
     $this->permissions_manager = $permissions_manager;
     $this->plugin = $plugin;
     $this->url_manager = $url_manager;
     $this->logger = $logger;
     $this->backend_gitolite = $backend_gitolite;
     $this->mirror_data_mapper = $mirror_data_mapper;
     $url = new Git_URL($this->projectManager, $this->factory, $_SERVER['REQUEST_URI']);
     $this->routeGitSmartHTTP($url);
     $this->routeUsingFriendlyURLs($url);
     $this->routeUsingStandardURLs($url);
     $valid = new Valid_GroupId('group_id');
     $valid->required();
     if ($this->request->valid($valid)) {
         $this->groupId = (int) $this->request->get('group_id');
     }
     $valid = new Valid_String('action');
     $valid->required();
     if ($this->request->valid($valid)) {
         $this->action = $this->request->get('action');
     }
     if (empty($this->action)) {
         $this->action = 'index';
     }
     if (empty($this->groupId)) {
         $this->addError('Bad request');
         $this->redirect('/');
     }
     $this->project = $this->projectManager->getProject($this->groupId);
     $this->projectName = $this->project->getUnixName();
     if (!$this->plugin_manager->isPluginAllowedForProject($this->plugin, $this->groupId)) {
         $this->addError($this->getText('project_service_not_available'));
         $this->redirect('/projects/' . $this->projectName . '/');
     }
     $this->permittedActions = array();
 }
開發者ID:LouisRenWeiWei,項目名稱:tuleap,代碼行數:49,代碼來源:Git.class.php


注:本文中的PluginManager::isPluginAllowedForProject方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。