当前位置: 首页>>代码示例>>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;未经允许,请勿转载。