本文整理匯總了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);
}