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


PHP ProjectManager::activate方法代碼示例

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


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

示例1: autoActivateProject

 private function autoActivateProject($group)
 {
     $auto_approval = ForgeConfig::get('sys_project_approval', 1) ? PROJECT_APPROVAL_BY_ADMIN : PROJECT_APPROVAL_AUTO;
     if ($this->force_activation || $auto_approval == PROJECT_APPROVAL_AUTO) {
         $this->projectManager->activate($group);
     }
 }
開發者ID:superlinger,項目名稱:tuleap,代碼行數:7,代碼來源:ProjectCreator.class.php

示例2: createProject

 /**
  * Instantiates a project with user, groups, admins ...
  *
  * @param string $project_short_name
  * @param string $project_long_name
  * @param string $is_public
  * @param array  $project_members
  * @param array  $project_admins
  */
 protected function createProject($project_short_name, $project_long_name, $is_public, array $project_members, array $project_admins, array $services)
 {
     $user = $this->user_manager->getUserByUserName(self::ADMIN_USER_NAME);
     $this->user_manager->setCurrentUser($user);
     $project = $this->project_creator->create($project_short_name, $project_long_name, array('project' => array('form_short_description' => '', 'is_test' => false, 'is_public' => $is_public, 'services' => $services, 'built_from_template' => 100)));
     $this->project_manager->activate($project);
     foreach ($project_members as $project_member) {
         $this->addMembersToProject($project, $project_member);
     }
     foreach ($project_admins as $project_admin) {
         $this->addAdminToProject($project, $project_admin);
     }
     return $project;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:23,代碼來源:TestDataBuilder.php

示例3: formatDataAndCreateProject

 /**
  * Create the data array needed by create_project and create the project
  * 
  * @param String $shortName
  * @param String $publicName
  * @param String $privacy
  * @param Project $template
  * 
  * @return Integer
  */
 private function formatDataAndCreateProject($shortName, $publicName, $privacy, Project $template)
 {
     $data = array('project' => array('form_license' => 'xrx', 'form_license_other' => '', 'form_short_description' => '', 'is_test' => false, 'is_public' => false, 'services' => array(), 'built_from_template' => $template->getID()));
     if ($privacy === Project::ACCESS_PUBLIC) {
         $data['project']['is_public'] = true;
     }
     foreach ($template->getServices() as $key => $service) {
         $is_used = $service->isActive() && $service->isUsed();
         $data['project']['services'][$service->getId()]['is_used'] = $is_used;
     }
     $project = $this->projectCreator->create($shortName, $publicName, $data);
     $this->projectManager->activate($project);
     return $project->getID();
 }
開發者ID:bamboolsu,項目名稱:tuleap,代碼行數:24,代碼來源:Project_SOAPServer.class.php


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