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