本文整理汇总了PHP中ProjectManager::getProjectFromAutocompleter方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectManager::getProjectFromAutocompleter方法的具体用法?PHP ProjectManager::getProjectFromAutocompleter怎么用?PHP ProjectManager::getProjectFromAutocompleter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectManager
的用法示例。
在下文中一共展示了ProjectManager::getProjectFromAutocompleter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: migrateProject
private function migrateProject($project_to_migrate)
{
$project = $this->project_manager->getProjectFromAutocompleter($project_to_migrate);
if ($project && $this->wiki_migrator->canMigrate($project)) {
$this->system_event_manager->createEvent(SystemEvent_PHPWIKI_SWITCH_TO_PLUGIN::NAME, $project->getId(), SystemEvent::PRIORITY_HIGH);
$GLOBALS['Response']->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('plugin_phpwiki', 'allowed_project_allow_project'));
} else {
$this->sendUpdateProjectListError();
}
}
示例2: allowSVNTokensForProject
private function allowSVNTokensForProject($project_to_migrate)
{
$project = $this->project_manager->getProjectFromAutocompleter($project_to_migrate);
if ($project && $this->token_manager->canAuthorizeTokens($project)) {
$this->token_manager->setProjectAuthorizesTokens($project);
$this->event_manager->processEvent(Event::SVN_AUTHORIZE_TOKENS, array('group_id' => $project->getID()));
$GLOBALS['Response']->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('svn_tokens', 'allowed_project_allow_project'));
} else {
$this->sendUpdateProjectListError();
}
}
示例3: allowProjectOnMirror
private function allowProjectOnMirror(Git_Mirror_Mirror $mirror, $project_to_add)
{
$project = $this->project_manager->getProjectFromAutocompleter($project_to_add);
if ($project && $this->git_mirror_resource_restrictor->allowProjectOnMirror($mirror, $project)) {
$GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_git', 'mirror_allowed_project_allow_project'));
$GLOBALS['Response']->redirect('/plugins/git/admin/?pane=mirrors_admin&action=manage-allowed-projects&mirror_id=' . $mirror->id);
}
$GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_git', 'mirror_allowed_project_update_project_list_error'));
$GLOBALS['Response']->redirect('/plugins/git/admin/?pane=mirrors_admin&action=manage-allowed-projects&mirror_id=' . $mirror->id);
}